-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
69 lines (51 loc) · 2.01 KB
/
docker-compose.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
68
69
services:
frontend:
container_name: streamlit_frontend
build:
context: ./frontend
dockerfile: Dockerfile
ports:
- "${STREAMLIT_PORT:?Your .env file must have a STREAMLIT_PORT variable}:8501"
volumes:
# Map local files to the container for live updates (useful for development)
# TODO: should this be removed for production? Likely...
- ./frontend/src:/app/src
- ./auth.yaml:/app/auth.yaml
environment:
# Avoid output buffering; this line ensures that print() statements are sent directly to the terminal
- PYTHONUNBUFFERED=1
# Set DEBUG to 1 (in your .env file) if you want to see the logs
- DEBUG=${DEBUG}
- API_URL=http://backend:${FASTAPI_PORT:-8000}
depends_on:
- backend
healthcheck:
test: ["CMD", "curl", "--fail", "http://localhost:${STREAMLIT_PORT}/_stcore/health"]
interval: 30s
timeout: 10s
retries: 3
restart: unless-stopped
command: ["streamlit", "run", "run_streamlit.py", "--server.port=8501", "--server.address=0.0.0.0", "--server.headless=true"]
# command: ["streamlit", "run", "run_streamlit.py", "--server.port=8501", "--server.address=0.0.0.0", "--server.headless=true", "--logger.level=debug"]
backend:
container_name: fastapi_backend
build:
context: .
dockerfile: server/Dockerfile
# ports:
# - "${FASTAPI_PORT:-8000}:8000"
volumes:
# Map local files to the container for live updates (useful for development)
# TODO: should this be removed for production? Likely...
- ./server/src:/app/src
environment:
# Avoid output buffering; this line ensures that print() statements are sent directly to the terminal
- PYTHONUNBUFFERED=1
# Set DEBUG to 1 (in your .env file) if you want to see the logs
- DEBUG=${DEBUG}
# healthcheck:
# test: ["CMD", "curl", "--fail", "http://localhost:8000/health"]
# interval: 30s
# timeout: 10s
# retries: 3
restart: unless-stopped