-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
66 lines (58 loc) · 1.41 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
version: '3.8'
services:
rabbitmq:
image: rabbitmq
container_name: rabbitmq
ports:
- 5672:5672
environment:
- RABBITMQ_DEFAULT_USER=admin
- RABBITMQ_DEFAULT_PASS=password
api:
build:
context: src/api
container_name: api
command: uvicorn main:app --proxy-headers --host 0.0.0.0 --port 8080
ports:
- 8080:8080
environment:
- CELERY_BROKER_URL=amqp://admin:password@rabbitmq:5672/
- CELERY_RESULT_BACKEND=rpc://admin:password@rabbitmq:5672/
depends_on:
- rabbitmq
worker:
build:
context: src/worker
container_name: worker1
command: celery --app main:celery worker -l info --concurrency=10
user: nobody
environment:
- CELERY_BROKER_URL=amqp://admin:password@rabbitmq:5672/
- CELERY_RESULT_BACKEND=rpc://admin:password@rabbitmq:5672/
depends_on:
- rabbitmq
flower:
image: mher/flower
container_name: flower
environment:
- CELERY_BROKER_URL=amqp://admin:password@rabbitmq:5672/
- FLOWER_PORT=5555
ports:
- 5555:5555
depends_on:
- worker
- rabbitmq
prometheus:
image: prom/prometheus
container_name: prometheus
ports:
- 9090:9090
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml
grafana:
image: grafana/grafana
container_name: grafana
ports:
- 3000:3000
depends_on:
- prometheus