-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yml
87 lines (78 loc) · 1.96 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
79
80
81
82
83
84
85
86
87
version: '3.7'
services:
web:
build: ./src
image: web
container_name: web
ports:
- 8000:8000
volumes:
- ./src:/usr/src/app
command: gunicorn -b 0.0.0.0:8000 app:app
environment:
- CELERY_BROKER=amqp://rabbitmq:5672
- CELERY_BACKEND=redis://redis:6379/0
depends_on:
- redis
- rabbitmq
celery1:
image: web
container_name: celery_worker1
volumes:
- ./src:/usr/src/app
- ./src/logs:/usr/src/app/logs
command: celery -A app.tasks worker --loglevel=info --logfile=logs/celery.log --concurrency=2 -n worker1@%h
environment:
- CELERY_BROKER=amqp://rabbitmq:5672
- CELERY_BACKEND=redis://redis:6379/0
depends_on:
- web
- redis
- rabbitmq
celery2:
image: web
container_name: celery_worker2
volumes:
- ./src:/usr/src/app
- ./src/logs:/usr/src/app/logs
command: celery -A app.tasks worker --loglevel=info --logfile=logs/celery.log --concurrency=2 -n worker2@%h
environment:
- CELERY_BROKER=amqp://rabbitmq:5672
- CELERY_BACKEND=redis://redis:6379/0
depends_on:
- web
- redis
- rabbitmq
celery3:
image: web
container_name: celery_worker3
volumes:
- ./src:/usr/src/app
- ./src/logs:/usr/src/app/logs
command: celery -A app.tasks worker --loglevel=info --logfile=logs/celery.log --concurrency=2 -n worker3@%h
environment:
- CELERY_BROKER=amqp://rabbitmq:5672
- CELERY_BACKEND=redis://redis:6379/0
depends_on:
- web
- redis
- rabbitmq
redis:
image: redis:5.0.3-alpine
container_name: redis
rabbitmq:
image: rabbitmq:management
container_name: rabbitmq
ports:
- "5672:5672"
- "15672:15672"
monitor:
image: web
container_name: flower
ports:
- 5555:5555
command: flower -A app.tasks --port=5555 --broker=amqp://rabbitmq:5672
depends_on:
- web
- redis
- rabbitmq