-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.prod.yml
More file actions
60 lines (56 loc) · 1.31 KB
/
docker-compose.prod.yml
File metadata and controls
60 lines (56 loc) · 1.31 KB
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
version: "3.9"
services:
api:
build:
context: .
dockerfile: Dockerfile
container_name: tree-evaluator-api-prod
restart: unless-stopped
environment:
- APP_ENV=production
- APP_NAME=Tree Evaluator API
- APP_VERSION=0.1.0
ports:
- "8000:8000"
networks:
- tree-evaluator-network
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/api/v1/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
streamlit:
build:
context: .
dockerfile: Dockerfile.streamlit
container_name: tree-evaluator-streamlit-prod
restart: unless-stopped
ports:
- "8501:8501"
volumes:
- chat_data:/app/data
environment:
- PYTHONPATH=/app
- CHAT_DB_PATH=/app/data/chat_index.db
# Per produzione: usa secrets manager invece di env var
- OPENAI_API_KEY=${OPENAI_API_KEY:-}
env_file:
- .env
networks:
- tree-evaluator-network
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8501/_stcore/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
depends_on:
api:
condition: service_healthy
networks:
tree-evaluator-network:
driver: bridge
volumes:
chat_data:
driver: local