-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yaml
34 lines (32 loc) · 941 Bytes
/
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
version: '3'
services:
api:
image: dsg05/info_gpt
ports:
- 8000:8000
depends_on:
- redis
- celery_worker
environment:
- REDIS_URL=redis://redis:6379
- OPENAI_API_KEY=${OPENAI_API_KEY}
- DB_COLLECTION_NAME=${DB_COLLECTION_NAME}
- SLACK_TOKEN=${SLACK_TOKEN}
- PEAK_API_KEY=${PEAK_API_KEY}
command: gunicorn info_gpt.api.app:app --workers 4 --worker-class uvicorn.workers.UvicornWorker --bind 0.0.0.0:8000
celery_worker:
image: dsg05/info_gpt
depends_on:
- redis
environment:
- REDIS_URL=redis://redis:6379
- OPENAI_API_KEY=${OPENAI_API_KEY}
- DB_COLLECTION_NAME=${DB_COLLECTION_NAME}
- SLACK_TOKEN=${SLACK_TOKEN}
- PEAK_API_KEY=${PEAK_API_KEY}
command: celery --app=info_gpt.api.tasks.celery_app worker --concurrency=2 --loglevel=info
redis:
image: redis:latest
restart: always
ports:
- 6379:6379