-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
90 lines (81 loc) · 2.32 KB
/
docker-compose.yaml
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
version: "3.6"
services:
rabbitmq:
image: "rabbitmq:3-management"
restart: always
ports:
- "8672:5672"
- "18672:15672"
prometheus:
image: "prom/prometheus"
ports:
- "9090:9090"
volumes:
- "./prometheus.yml:/etc/prometheus/prometheus.yml"
grafana:
image: "grafana/grafana"
ports:
- "3000:3000"
volumes:
- "grafana-storage:/var/lib/grafana"
celery_exporter:
build:
context: .
dockerfile: Dockerfile
depends_on:
- rabbitmq
restart: always
ports:
- "9808:9808"
command: python -m celery_exporter
environment:
BROKER_URL: amqp://guest:guest@rabbitmq:5672
WORKER_TIMEOUT_SECONDS: 30
PURGE_OFFLINE_WORKER_METRICS_AFTER_SECONDS: 60
celery_worker_default_1:
build:
context: .
dockerfile: Dockerfile
depends_on:
- rabbitmq
command: celery --workdir examples -A service_default worker -n default-1@%h -c 8 -Q celery,celery.example_queue_1,celery.example_queue_2,celery.example_queue_3
environment:
BROKER_URL: amqp://guest:guest@rabbitmq:5672
celery_worker_default_2:
build:
context: .
dockerfile: Dockerfile
depends_on:
- rabbitmq
command: celery --workdir examples -A service_default worker -n default-2@%h -c 4 -Q celery.example_queue_1,celery.example_queue_2
environment:
BROKER_URL: amqp://guest:guest@rabbitmq:5672
celery_worker_service_a_1:
build:
context: .
dockerfile: Dockerfile
depends_on:
- rabbitmq
command: celery --workdir examples -A service_a worker -n service_a-1@%h -c 10 -Q service_a,service_a.example_queue_1,service_a.example_queue_2,service_a.example_queue_3
environment:
BROKER_URL: amqp://guest:guest@rabbitmq:5672
celery_worker_service_a_2:
build:
context: .
dockerfile: Dockerfile
depends_on:
- rabbitmq
command: celery --workdir examples -A service_a worker -n service_a-2@%h -c 2 -Q service_a.example_queue_1,service_a.example_queue_2
environment:
BROKER_URL: amqp://guest:guest@rabbitmq:5672
celery_producer:
build:
context: .
dockerfile: Dockerfile
depends_on:
- rabbitmq
command: python examples/producer.py
environment:
BROKER_URL: amqp://guest:guest@rabbitmq:5672
volumes:
grafana-storage: