Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
67 lines (56 loc) · 1.77 KB
/
Copy pathdocker-compose.yml
File metadata and controls
67 lines (56 loc) · 1.77 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
version: '3.8'
services:
malware:
build: .
container_name: malware
restart: unless-stopped
# Security options
security_opt:
- no-new-privileges:true
read_only: true
tmpfs:
- /tmp
- /root/.streamlit
# Resource limits
deploy:
resources:
limits:
cpus: '1.0'
memory: 1G
reservations:
cpus: '0.25'
memory: 256M
# Logging configuration
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
# Override the entrypoint to add baseUrlPath for Traefik routing
command: >
streamlit run app.py
--server.port=8501
--server.address=0.0.0.0
--server.baseUrlPath=/malware
--server.enableCORS=false
--server.enableXsrfProtection=true
networks:
- traefik-public
labels:
- "traefik.enable=true"
# HTTPS Router
- "traefik.http.routers.malware.rule=Host(`gopee.dev`) && PathPrefix(`/malware`)"
- "traefik.http.routers.malware.entrypoints=websecure"
- "traefik.http.routers.malware.tls=true"
- "traefik.http.routers.malware.tls.certresolver=letsencrypt"
- "traefik.http.routers.malware.priority=200"
- "traefik.http.routers.malware.middlewares=security-headers@file,compression@file,rate-limit-general@file"
# Service configuration
- "traefik.http.services.malware.loadbalancer.server.port=8501"
# Health check (must include baseUrlPath)
- "traefik.http.services.malware.loadbalancer.healthcheck.path=/malware/_stcore/health"
- "traefik.http.services.malware.loadbalancer.healthcheck.interval=30s"
- "traefik.http.services.malware.loadbalancer.healthcheck.timeout=10s"
networks:
traefik-public:
external: true