-
Notifications
You must be signed in to change notification settings - Fork 100
/
Copy pathdocker-compose.yaml
49 lines (48 loc) · 1.35 KB
/
docker-compose.yaml
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
version: "3.9"
services:
api:
build:
context: .
# use Dockerfile.gpu when using a NVIDIA GPU
dockerfile: Dockerfile
ports:
- "3000:3000"
volumes:
- .:/workspace
depends_on:
- redis
environment:
- BASE_URL
- EMAIL_SENDER_ADDRESS
- EMAIL_SENDER_PASSWORD
- EMAIL_SENDER_HOST
- DISCLAIMER
- ALLOWED_WEBHOOKS_FILE
command: gunicorn -w 2 -b 0.0.0.0:3000 --log-file=- 'src.main:app'
worker:
build:
context: .
# use Dockerfile.gpu when using a NVIDIA GPU
dockerfile: Dockerfile
volumes:
- .:/workspace
depends_on:
- redis
environment:
- BASE_URL
- EMAIL_SENDER_ADDRESS
- EMAIL_SENDER_PASSWORD
- EMAIL_SENDER_HOST
- ALLOWED_WEBHOOKS_FILE
command: rq worker --url redis://redis:6379 -c worker-settings
# Uncomment the following lines when using a NVIDIA GPU
# deploy:
# resources:
# reservations:
# devices:
# - driver: nvidia
# capabilities: [gpu]
redis:
image: redis
ports:
- "6379:6379"