forked from thanatchakromsang/django-celery-poc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
78 lines (71 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.4'
services:
web:
build:
context: cpoc-web/
dockerfile: Dockerfile
ports:
- "8000:8000"
links:
- redis
- db
depends_on:
- redis
- db
volumes:
- ./cpoc-web:/app
command: bash -c "chmod +x entrypoint.sh && ./entrypoint.sh"
db:
image: postgres:latest
ports:
- "5432:5432"
redis:
image: "redis:alpine"
ports:
- "6379:6379"
volumes:
- 'redisdata:/data'
queue-a:
build:
context: cpoc-web/
dockerfile: Dockerfile.worker
environment:
- WORKER_QUEUE=queue_a
- WORKER_NAME=worker_A
command: bash -c "chmod +x entrypoint-worker.sh && ./entrypoint-worker.sh"
depends_on:
- web
queue-b:
build:
context: cpoc-web/
dockerfile: Dockerfile.worker
environment:
- WORKER_QUEUE=queue_b
- WORKER_NAME=worker_B
command: bash -c "chmod +x entrypoint-worker.sh && ./entrypoint-worker.sh"
depends_on:
- web
queue-c:
build:
context: cpoc-web/
dockerfile: Dockerfile.worker
environment:
- WORKER_QUEUE=queue_c
- WORKER_NAME=worker_C
command: bash -c "chmod +x entrypoint-worker.sh && ./entrypoint-worker.sh"
depends_on:
- web
scheduler:
build:
context: cpoc-web/
dockerfile: Dockerfile.worker
command: bash -c "chmod +x entrypoint-beat.sh && ./entrypoint-beat.sh"
depends_on:
- web
queue-monitor:
image: mher/flower
command: flower --basic_auth=${QUEUE_MONITOR_USERNAME}:${QUEUE_MONITOR_PASSWORD} --address=0.0.0.0 --port=5555 --broker=redis://redis:6379
ports:
- '5555:5555'
volumes:
redisdata: