-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathprod-docker-compose.yml
More file actions
96 lines (88 loc) · 2.27 KB
/
prod-docker-compose.yml
File metadata and controls
96 lines (88 loc) · 2.27 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
version: "3.9"
services:
rabbitmq:
image: "rabbitmq:alpine"
ports:
- target: 5672
published: 5672
protocol: tcp
mode: host
healthcheck:
test: rabbitmq-diagnostics -q ping
interval: 30s
timeout: 30s
retries: 3
deploy:
placement:
constraints:
- "node.labels.TAG==prod"
django:
image: django-prod
command: python manage.py runserver 0.0.0.0:8010
environment:
- CELERY_BROKER_URL=amqp://guest:guest@rabbitmq:5672//
- DJANGO_SETTINGS_MODULE=config.django.production
volumes:
- .:/app
- /var/www:/var/www
ports:
- target: 8010
published: 8010
protocol: tcp
mode: host
depends_on:
- rabbitmq
restart: on-failure
deploy:
placement:
constraints:
- "node.labels.TAG==prod"
celery:
image: django-local
#https://stackoverflow.com/questions/55249197/what-are-the-consequences-of-disabling-gossip-mingle-and-heartbeat-for-celery-w
command: celery -A open_schools_platform.tasks worker -l info --without-mingle --without-gossip
environment:
- CELERY_BROKER_URL=amqp://guest:guest@rabbitmq:5672//
- DJANGO_SETTINGS_MODULE=config.django.production
volumes:
- .:/app
- /var/www:/var/www
depends_on:
- rabbitmq
restart: on-failure
deploy:
placement:
constraints:
- "node.labels.TAG==prod"
flower:
image: mher/flower
environment:
- CELERY_BROKER_URL=amqp://guest:guest@rabbitmq:5672//
- FLOWER_PORT=5555
ports:
- target: 5555
published: 5555
protocol: tcp
mode: host
volumes:
- /flower-data:/data
deploy:
placement:
constraints:
- "node.labels.TAG==prod"
beats:
image: django-local
command: celery -A open_schools_platform.tasks beat -l info --scheduler django_celery_beat.schedulers:DatabaseScheduler
environment:
- CELERY_BROKER_URL=amqp://guest:guest@rabbitmq:5672//
- DJANGO_SETTINGS_MODULE=config.django.production
volumes:
- .:/app
- /var/www:/var/www
depends_on:
- rabbitmq
restart: on-failure
deploy:
placement:
constraints:
- "node.labels.TAG==prod"