This commit is contained in:
team3
2026-08-12 19:30:41 +02:00
commit 38d5a8cfae
30 changed files with 4157 additions and 0 deletions

32
docker-compose.yml Normal file
View File

@@ -0,0 +1,32 @@
services:
horror:
build:
context: .
container_name: horror
restart: unless-stopped
env_file: .env
environment:
DB_PATH: /data/horror.db
healthcheck:
test: ["CMD", "python3", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/api/health', timeout=5)"]
interval: 30s
timeout: 10s
retries: 3
# Traefik routet erst ab "healthy" — ohne dichten Start-Takt prüft Docker
# erstmals nach `interval` und die Seite ist ~30-60s lang 404
start_period: 30s
start_interval: 2s
networks:
- web
volumes:
- ./data:/data
labels:
- "traefik.enable=true"
- "traefik.http.routers.horrorapp.rule=Host(`horror.marha.de`)"
- "traefik.http.routers.horrorapp.entrypoints=websecure"
- "traefik.http.routers.horrorapp.tls.certresolver=letsencrypt"
- "traefik.http.services.horrorapp.loadbalancer.server.port=8000"
networks:
web:
external: true