-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose-dev.yml
41 lines (40 loc) · 990 Bytes
/
docker-compose-dev.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
services:
api:
build: .
command: "poetry run uvicorn main:app --host 0.0.0.0 --port 8000 --reload"
env_file:
- env/dev.env
environment:
- CELERY_BROKER_URL=amqp://guest:guest@broker:5672
- FIREBASE_CREDENTIALS_FILE=/run/secrets/firebase-credentials
- MEDIA_ROOT=/api/media
ports:
- 8000:8000
secrets:
- firebase-credentials
volumes:
- .:/api
worker:
build: .
command: "poetry run celery -A tasks worker"
depends_on:
- broker
environment:
- CELERY_BROKER_URL=amqp://guest:guest@broker:5672
- CELERY_RESULT_BACKEND=rpc
- FIREBASE_CREDENTIALS_FILE=/run/secrets/firebase-credentials
- MEDIA_ROOT=/api/media
env_file:
- env/dev.env
secrets:
- firebase-credentials
volumes:
- .:/api
broker:
image: rabbitmq:3-management
ports:
- 5672:5672
- 15672:15672
secrets:
firebase-credentials:
file: $FIREBASE_CREDENTIALS_FILE