-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-prod.yml
49 lines (47 loc) · 1.12 KB
/
docker-compose-prod.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
48
49
services:
api:
command: "poetry run uvicorn main:app --host 0.0.0.0 --port 8000"
environment:
- CELERY_BROKER_URL=amqp://guest:guest@broker:5672
- FIREBASE_CREDENTIALS_FILE=/run/secrets/firebase-credentials
- MEDIA_ROOT=/api/media
env_file:
- env/prod.env
image: ${IMAGE}:${TAG}
ports:
- 8000:8000
secrets:
- firebase-credentials
volumes:
- media:/api/media
worker:
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/prod.env
image: ${IMAGE}:${TAG}
secrets:
- firebase-credentials
volumes:
- media:/api/media
broker:
image: rabbitmq:3-management
ports:
- 5672:5672
- 15672:15672
volumes:
media:
driver: local
driver_opts:
type: none
o: bind
device: $MEDIA_ROOT
secrets:
firebase-credentials:
file: $FIREBASE_CREDENTIALS_FILE