Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
85 lines (72 loc) · 2.17 KB
/
Copy pathdocker-compose.yml
File metadata and controls
85 lines (72 loc) · 2.17 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
services:
streamlit-dashboard:
build:
context: .
dockerfile: Dockerfile
container_name: sql-server-dashboard
ports:
- "8501:8501"
environment:
# Database Configuration
- SQL_SERVER_HOST=${SQL_SERVER_HOST:-localhost}
- SQL_SERVER_DATABASE=${SQL_SERVER_DATABASE:-TimeTracking}
- SQL_SERVER_USERNAME=${SQL_SERVER_USERNAME}
- SQL_SERVER_PASSWORD=${SQL_SERVER_PASSWORD}
# Entra ID Configuration (Optional)
- ENTRA_CLIENT_ID=${ENTRA_CLIENT_ID}
- ENTRA_CLIENT_SECRET=${ENTRA_CLIENT_SECRET}
- ENTRA_TENANT_ID=${ENTRA_TENANT_ID}
# Streamlit Configuration
- STREAMLIT_SERVER_PORT=8501
- STREAMLIT_SERVER_ADDRESS=0.0.0.0
- STREAMLIT_BROWSER_GATHER_USAGE_STATS=false
- STREAMLIT_SERVER_ENABLE_CORS=true
- STREAMLIT_SERVER_ENABLE_XSRF_PROTECTION=false
volumes:
# Mount configuration files
- ./config/users.json:/app/config/users.json:ro
# Mount data directory for SQLite budget database (use named volume for permissions)
- data-volume:/app/data
# Mount cache directory for persistent target hours (use named volume for permissions)
- cache-data:/app/cache
# Mount logs directory (use named volume for permissions)
- logs-data:/app/logs
networks:
- dashboard-network
restart: unless-stopped
# Resource limits
deploy:
resources:
limits:
memory: 1G
cpus: '0.5'
reservations:
memory: 512M
cpus: '0.25'
# Health check
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8501/_stcore/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
# Optional: Redis for enhanced caching (uncomment if needed)
# redis:
# image: redis:7-alpine
# container_name: dashboard-redis
# ports:
# - "6379:6379"
# volumes:
# - redis-data:/data
# networks:
# - dashboard-network
# restart: unless-stopped
networks:
dashboard-network:
driver: bridge
volumes:
# Uncomment if using Redis
# redis-data:
data-volume:
cache-data:
logs-data: