-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
50 lines (46 loc) · 1.32 KB
/
docker-compose.yml
File metadata and controls
50 lines (46 loc) · 1.32 KB
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
version: "3.7"
services:
# broker deployment
rabbit:
hostname: rabbit
image: rabbitmq:3-management
container_name: prosimos-rabbitmq
# environment:
# - RABBITMQ_DEFAULT_USER=myuser
# - RABBITMQ_DEFAULT_PASS=mypassword
ports:
- 5672:5672 # port for the worker for tasks management
- 15672:15672 # GUI port
# worker deployment
worker:
build:
context: .
dockerfile: Dockerfile.worker
container_name: prosimos-celery-worker
environment:
- CELERY_BROKER_URL=amqp://rabbit:5672/
- CELERY_RESULT_BACKEND=redis://redis:6379/
- FLASK_DEBUG=1
volumes:
- ./src/celery/data:/app/src/celery/data
depends_on:
- rabbit
- redis
# flask app deployment
api:
build:
context: .
dockerfile: Dockerfile.api
container_name: prosimos-api
ports:
- 5000:5000
volumes:
- ./src/celery/data:/app/src/celery/data
environment:
- CELERY_BROKER_URL=amqp://rabbit:5672/
- CELERY_RESULT_BACKEND=redis://redis:6379/
- FLASK_DEBUG=1
redis:
image: redis:6-alpine
ports:
- 6379:6379