-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.dev.yml
67 lines (62 loc) · 2.11 KB
/
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# --- Development docker compose file
version: '3.8'
networks:
dash_chatgpt-network-dev:
services:
# database serving as cache for callbacks and broker for async. processes
redis:
container_name: dash_chatgpt_challenge-redis-dev
image: docker.io/redis:latest
networks:
- dash_chatgpt-network-dev
restart: unless-stopped
# worker for async. processes
celery_worker:
container_name: propaganda_bot-celery_worker-dev
image: docker.io/vsisl/propaganda_bot-celery_worker:latest
build:
context: .
dockerfile: celery_app/Dockerfile
networks:
- dash_chatgpt-network-dev
environment:
- PYTHONUNBUFFERED=1 # in order to get python prints into the container's log file
- REDISTOGO_URL=redis://redis:6379 # to connect with redis
- OPENAI_API_KEY=${OPENAI_API_KEY} # add your api key here
depends_on:
- redis
logging:
driver: json-file
options:
max-file: '10'
max-size: '200k'
restart: unless-stopped
volumes:
- ../dash-chatgpt-challenge:/home/docker/dash-chatgpt-challenge
# plotly dash app
dash_app:
container_name: propaganda_bot-dash_app-dev
image: docker.io/vsisl/propaganda_bot-dash_app:latest
build:
context: .
dockerfile: dash_app/Dockerfile
networks:
- dash_chatgpt-network-dev
ports:
- "8000:8000" # specify the port for the webapp; host port:container port
environment:
- PYTHONUNBUFFERED=1 # in order to get python prints into the container's log file
- REDISTOGO_URL=redis://redis:6379 # to connect with redis
- OPENAI_API_KEY=${OPENAI_API_KEY} # add your api key here
depends_on:
- redis
- celery_worker
logging:
driver: json-file
options:
max-file: '10'
max-size: '200k'
restart: unless-stopped
volumes:
- ../dash-chatgpt-challenge:/home/docker/dash-chatgpt-challenge
command: ["python", "-m", "dash_app.app"] # overriding the default command in the container (to run flask server instead of gunicorn)