-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
78 lines (76 loc) · 1.66 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
version: "3.8"
services:
wsgi:
build:
context: ./backend/
dockerfile: ../docker/django/Dockerfile
command: gunicorn sqtrex.wsgi:application --log-file=- --bind 0.0.0.0:8000
expose:
- 8000
volumes:
- media_volume:/home/app/web/media
env_file:
- ./.env
depends_on:
- db
restart: always
asgi:
build:
context: ./backend/
dockerfile: ../docker/django/Dockerfile
command: daphne --proxy-headers --port 8001 --bind 0.0.0.0 sqtrex.asgi:application
expose:
- 8001
env_file:
- ./.env
depends_on:
- db
- redis
restart: always
huey:
build:
context: ./backend/
dockerfile: ../docker/django/Dockerfile
volumes:
- media_volume:/home/app/web/media
command: python manage.py run_huey
env_file:
- ./.env
depends_on:
- redis
restart: always
db:
image: postgres:12.3-alpine
volumes:
- postgres_data:/var/lib/postgresql/data/
env_file:
- ./.env
restart: always
frontend:
build:
context: ./frontend/
dockerfile: ../docker/frontend/Dockerfile
volumes:
- frontend_data:/usr/src/app/www/frontend
nginx:
build: ./docker/nginx
volumes:
- frontend_data:/usr/src/app/www/frontend
- media_volume:/home/app/web/media
ports:
- 80:80
depends_on:
- frontend
- wsgi
- asgi
restart: always
command: '/bin/sh -c ''while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g "daemon off;"'''
redis:
image: redis:6
expose:
- 6379
restart: always
volumes:
postgres_data:
frontend_data:
media_volume: