-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
61 lines (54 loc) · 1.35 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
services:
flower:
container_name: flower
image: mher/flower
ports:
- "5555:5555"
environment:
CELERY_BROKER_URL: amqp://guest:guest@rabbitmq:5672//
rabbitmq:
container_name: rabbitmq
image: rabbitmq:3-management
ports:
- "15672:15672"
- "5672:5672"
redis:
container_name: redis
build: docker/redis
celery_worker:
container_name: worker
build:
context: ./celery_tasks
dockerfile: Dockerfile
entrypoint: celery
command: -A tasks worker --loglevel=info -Q celery -E -B
environment:
CELERY_BROCKER_URL: amqp://guest:guest@rabbitmq:5672//
CELERY_RESULT_BACKEND: redis://redis:6379/0
depends_on:
- redis
volumes:
- ./celery_tasks:/queue
celery_power_worker:
container_name: power_worker
build:
context: ./celery_tasks
dockerfile: Dockerfile
entrypoint: celery
command: -A tasks worker --loglevel=info -Q power_task,dead_letter -E -B
environment:
CELERY_BROCKER_URL: amqp://guest:guest@rabbitmq:5672//
CELERY_RESULT_BACKEND: redis://redis:6379/0
depends_on:
- redis
volumes:
- ./celery_tasks:/queue
fastapi_app:
container_name: fastapi_app
build:
context: ./fastapi_app
dockerfile: Dockerfile
ports:
- "8001:80"
depends_on:
- celery_worker