-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdocker-compose.prod.yml
79 lines (72 loc) · 1.51 KB
/
docker-compose.prod.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
79
version: "3.5"
volumes:
db-data: {}
django_static: {}
services:
postgres:
image: postgres
env_file: .env
volumes:
- db-data:/var/lib/postgresql/data
ports:
- "127.0.0.1:5432:5432"
nginx:
build:
context: .
dockerfile: ./docker/nginx/Dockerfile
volumes:
- ./docker/nginx/conf.d:/etc/nginx/conf.d
- django_static:/dist_django
- ./docker/nginx/certs:/etc/nginx/certs
network_mode: host
command: /start.sh
depends_on:
- django
- postgres
- redis
django:
build:
context: .
dockerfile: ./docker/django/Dockerfile
env_file: .env
command: /start-prod-django.sh
volumes:
- .:/code
- django_static:/code/dist/static
network_mode: host
depends_on:
- postgres
- redis
redis:
image: redis
user: root
volumes:
- ./redis-data:/data
command: ["redis-server", "--appendonly", "yes"]
ports:
- "127.0.0.1:6379:6379"
dramatiq-workers:
build:
context: .
dockerfile: ./docker/django/Dockerfile
env_file: .env
command: pipenv run python manage.py rundramatiq
network_mode: host
volumes:
- .:/code
depends_on:
- django
- redis
scheduler:
build:
context: .
dockerfile: ./docker/django/Dockerfile
env_file: .env
command: pipenv run python manage.py run_scheduler
network_mode: host
volumes:
- .:/code
depends_on:
- django
- redis
- dramatiq-workers