forked from mrwadams/stride-gpt
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
51 lines (44 loc) · 1.13 KB
/
Copy pathdocker-compose.yml
File metadata and controls
51 lines (44 loc) · 1.13 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
services:
stridegpt-ui:
build:
context: .
dockerfile: Dockerfile.ui
ports:
- "8501:8501"
# Security settings
security_opt:
- no-new-privileges:true
cap_drop:
- ALL
cap_add:
- NET_BIND_SERVICE
# Writable temporary filesystems for Streamlit
tmpfs:
- /tmp:noexec,nosuid,size=100m
- /home/appuser/.streamlit:noexec,nosuid,size=50m
- /home/appuser/.cache:noexec,nosuid,size=100m
# Resource limits
deploy:
resources:
limits:
cpus: '2.0'
memory: 2G
reservations:
cpus: '0.5'
memory: 512M
# Environment variables (override with .env file)
environment:
- STREAMLIT_SERVER_ENABLE_XSRF_PROTECTION=true
env_file:
- .env
# Run as non-root (matches Dockerfile.ui user)
user: "1000:1000"
# Health check using curl (matches Dockerfile.ui)
healthcheck:
test: ["CMD", "curl", "--fail", "http://localhost:8501/_stcore/health"]
interval: 30s
timeout: 5s
retries: 3
start_period: 5s
# Restart policy for production
restart: unless-stopped