-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
59 lines (53 loc) · 1.02 KB
/
docker-compose.yml
File metadata and controls
59 lines (53 loc) · 1.02 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
version: '3'
services:
shiftsapp:
build: ./scheduleweb
networks:
- nginx_network
- db_network
volumes:
- appvol:/web/scheduleweb
expose:
- 8000
depends_on:
- db
container_name: app_container
command:
- /bin/sh
- -c
- |
sleep 20
python manage.py collectstatic --no-input
python manage.py makemigrations
python manage.py migrate
gunicorn scheduleweb.wsgi -w 5 -b 0.0.0.0:8000
nginx:
restart: always
build: ./nginx
ports:
- 80:80
volumes:
- appvol:/web/scheduleweb
- staticvol:/web/scheduledweb/static
depends_on:
- shiftsapp
networks:
- nginx_network
db:
restart: on-failure
build: ./postgres
env_file:
- postgres/db_env
networks:
- db_network
volumes:
- pgdata:/var/lib/postgresql/data
networks:
nginx_network:
driver: bridge
db_network:
driver: bridge
volumes:
pgdata:
appvol:
staticvol: