forked from mattkohl/docker-flask-celery-redis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
41 lines (41 loc) · 918 Bytes
/
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
version: "3.7"
services:
web:
build:
context: ./api
dockerfile: Dockerfile
restart: always
ports:
- "5001:5001"
depends_on:
- redis
volumes: ['./api:/api']
worker:
build:
context: ./celery-queue
dockerfile: Dockerfile
command: celery -A tasks worker -l info -E
environment:
CELERY_BROKER_URL: redis://redis
CELERY_RESULT_BACKEND: redis://redis
depends_on:
- redis
volumes: ['./celery-queue:/queue']
monitor:
build:
context: ./celery-queue
dockerfile: Dockerfile
ports:
- "5555:5555"
command: ['celery', 'flower', '-A', 'tasks']
environment:
CELERY_BROKER_URL: redis://redis:6379/0
CELERY_RESULT_BACKEND: redis://redis:6379/0
depends_on:
- redis
- worker
volumes: ['./celery-queue:/queue']
redis:
image: redis:alpine
ports:
- "6379:6379"