-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yaml
55 lines (50 loc) · 1.28 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
version: '3'
services:
broker:
image: rabbitmq:3-management
ports:
- "15672:15672"
- "5672:5672"
volumes:
- ./config/rabbitmq/rabbit.conf:/etc/rabbit/rabbit.conf
backend:
image: redis
ports:
- "6379:6379"
worker:
image: anax32/clree-fast-worker
build: .
environment:
CELERY_BROKER_URL: "amqp://guest@broker/"
CELERY_RESULT_BACKEND: "redis://backend:6379/0"
command: celery --app myapp.worker.main:celery_app worker -E
depends_on:
- backend
- broker
deploy:
replicas: 2
api:
image: anax32/clree-api
build: .
environment:
CELERY_BROKER_URL: "amqp://guest@broker/"
CELERY_RESULT_BACKEND: "redis://backend:6379/0"
ports:
- 8000:8000
command: gunicorn -w 1 -k uvicorn.workers.UvicornH11Worker -b 0.0.0.0:8000 --access-logfile - myapp.api.main:app
depends_on:
- backend
- broker
monitor:
image: anax32/clree-monitor
build: .
environment:
CELERY_BROKER_URL: "amqp://guest@broker/"
CELERY_RESULT_BACKEND: "redis://backend:6379/0"
ports:
- 5555:5555
entrypoint: /bin/bash
command: -c "sleep 10 ; celery flower --broker_api=http://guest:guest@broker:15672/api/"
depends_on:
- backend
- broker