-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathdocker-compose.yml
47 lines (42 loc) · 1 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
version: '3.8'
services:
web:
build: ./project
image: web
container_name: web
ports:
- 8000:8000
volumes:
- ./project:/usr/src/app
command: gunicorn -b 0.0.0.0:8000 app:app
environment:
- CELERY_BROKER=redis://redis:6379/0
- CELERY_BACKEND=redis://redis:6379/0
depends_on:
- redis
celery:
image: web
volumes:
- ./project:/usr/src/app
- ./project/logs:/usr/src/app/logs
command: celery -A app.tasks worker --loglevel=info --logfile=logs/celery.log
environment:
- CELERY_BROKER=redis://redis:6379/0
- CELERY_BACKEND=redis://redis:6379/0
depends_on:
- web
- redis
redis:
image: redis:7-alpine
monitor:
build: ./project
image: web
ports:
- 5555:5555
command: celery flower -A app.tasks --port=5555 --broker=redis://redis:6379/0
environment:
- CELERY_BROKER=redis://redis:6379/0
- CELERY_BACKEND=redis://redis:6379/0
depends_on:
- web
- redis