-
Notifications
You must be signed in to change notification settings - Fork 21
/
docker-compose.yml
54 lines (51 loc) · 1.34 KB
/
docker-compose.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
45
46
47
48
49
50
51
52
53
54
version: '3'
services:
db1:
image: postgres:11.1
env_file:
- config/db/db1_env
networks:
- db1_net
volumes:
- db1_volume:/var/lib/postgresql/data
web:
build: .
command: >
bash -c "python3 manage.py migrate --settings=tally_ho.settings.docker
&& python manage.py create_groups --settings=tally_ho.settings.docker
&& python manage.py create_demo_users --settings=tally_ho.settings.docker
&& python manage.py create_quarantine_checks --settings=tally_ho.settings.docker
&& DJANGO_SETTINGS_MODULE=tally_ho.settings.docker gunicorn --limit-request-line 6000 --chdir /code --bind :8000 tally_ho.wsgi:application"
volumes:
- .:/code
- static_volume:/code/tally_ho/static
- media_volume:/code/tally_ho/media
depends_on:
- db1
networks:
- nginx_net
- db1_net
nginx:
command: >
bash -c "sleep 2 && nginx -g 'daemon off;'"
image: nginx:1.15.6
ports:
- 8000:80
# change to 80:80 for production
volumes:
- ./config/nginx/conf.d:/etc/nginx/conf.d
- static_volume:/code/tally_ho/static
- media_volume:/code/tally_ho/media
depends_on:
- web
networks:
- nginx_net
networks:
nginx_net:
driver: bridge
db1_net:
driver: bridge
volumes:
db1_volume:
static_volume:
media_volume: