forked from ambition-study/ambition
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathproduction.yml
44 lines (39 loc) · 1.13 KB
/
production.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
version: '3'
services:
nginx:
image: nginx:latest
container_name: nginx
volumes:
- .:/app
# - ./nginx/conf.d:/etc/nginx/conf.d
- /srv/$DJANGO_APP_NAME/log:$DJANGO_LOG_FOLDER
- /srv/$DJANGO_APP_NAME/static:$DJANGO_STATIC_ROOT
depends_on:
- edc
db:
image: mysql:5.7
container_name: $DB_CONTAINER_NAME
environment:
- MYSQL_DATABASE=$MYSQL_DATABASE
- MYSQL_ROOT_PASSWORD=$MYSQL_ROOT_PASSWORD
volumes:
- /srv/$DJANGO_APP_NAME/data:/var/lib/mysql
- /srv/$DJANGO_APP_NAME/log:$DJANGO_LOG_FOLDER
- /srv/$DJANGO_APP_NAME/backup:$MYSQL_BACKUP_FOLDER
edc:
build:
context: .
dockerfile: ./compose/production/Dockerfile
container_name: $WEB_CONTAINER_NAME
volumes:
- .:/app
- /srv/$DJANGO_APP_NAME/export:$DJANGO_EXPORT_FOLDER
- /srv/$DJANGO_APP_NAME/.etc:$DJANGO_ETC_FOLDER
- /srv/$DJANGO_APP_NAME/static:$DJANGO_STATIC_ROOT
- /srv/$DJANGO_APP_NAME/log:$DJANGO_LOG_FOLDER
- /srv/$DJANGO_APP_NAME/backup:$MYSQL_BACKUP_FOLDER
ports:
- 80:80
- 443:443
depends_on:
- db