33 lines
990 B
YAML
33 lines
990 B
YAML
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
|