-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
60 lines (60 loc) · 1.42 KB
/
docker-compose.yml
File metadata and controls
60 lines (60 loc) · 1.42 KB
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
version: '3'
services:
asrg-db:
container_name: asrg-postgres
restart: unless-stopped
image: postgres:12.4
ports:
- "${POSTGRES_PORT}:5432"
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- PGDATA=${PGDATA}
volumes:
- ./db_backup/:/var/lib/postgresql/data
networks:
- db_network
asrg-app:
container_name: asrg-app
restart: unless-stopped
command: /bin/bash /opt/code/docker-entrypoint.sh
volumes:
- ./django_app/:/opt/code
env_file: ./.env
environment:
- WAIT_HOSTS=asrg-db:5432
build: .
ports:
- "${ASRG_APP_PORT}:5005"
networks:
- web_network
- db_network
depends_on:
- asrg-db
nginx:
container_name: asrg-nginx
restart: unless-stopped
image: "nginx:1.17.2"
env_file: ./.env
command: /bin/bash -c "envsubst < /etc/nginx/conf.d/asrg.template > /etc/nginx/conf.d/default.conf && nginx -g 'daemon off;'"
ports:
- "${NGINX_HTTP_PORT}:80"
- "${NGINX_HTTPS_PORT}:443"
volumes:
- ./nginx:/etc/nginx/conf.d
- ./django_app/asrg/media:/opt/asrg/media
# - ${CERTS_PATH}:/etc/nginx/certs
networks:
- web_network
depends_on:
- asrg-app
networks:
db_network:
driver: bridge
web_network:
driver: bridge
volumes:
db_data: {}
pgdata:
driver: local