1version: '3.8'
2
3services:
4
5 web:
6 build: .
7 image: web
8 container_name: web
9 ports:
10 - 5004:5000
11 command: python manage.py run -h 0.0.0.0
12 volumes:
13 - .:/usr/src/app
14 environment:
15 - FLASK_DEBUG=1
16 - APP_SETTINGS=project.server.config.DevelopmentConfig
17 - CELERY_BROKER_URL=redis://redis:6379/0
18 - CELERY_RESULT_BACKEND=redis://redis:6379/0
19 depends_on:
20 - redis
21
22 worker:
23 build: .
24 command: celery worker --app=project.server.tasks.celery --loglevel=info
25 volumes:
26 - .:/usr/src/app
27 environment:
28 - FLASK_DEBUG=1
29 - APP_SETTINGS=project.server.config.DevelopmentConfig
30 - CELERY_BROKER_URL=redis://redis:6379/0
31 - CELERY_RESULT_BACKEND=redis://redis:6379/0
32 depends_on:
33 - web
34 - redis
35
36 redis:
37 image: redis:6-alpine
38