56 lines
1.7 KiB
YAML
56 lines
1.7 KiB
YAML
services:
|
|
horror:
|
|
build:
|
|
context: .
|
|
container_name: horror
|
|
restart: unless-stopped
|
|
env_file: .env
|
|
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
|
|
environment:
|
|
DB_PATH: /data/horror.db
|
|
MEDIAMTX_URL: http://mediamtx:8890
|
|
MEDIAMTX_PLAYBACK_URL: http://mediamtx:9996
|
|
depends_on:
|
|
- mediamtx
|
|
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"
|
|
|
|
mediamtx:
|
|
image: bluenviron/mediamtx:latest
|
|
container_name: horror-mediamtx
|
|
restart: unless-stopped
|
|
env_file: .env
|
|
environment:
|
|
# MediaMTX liest Konfiguration auch aus der Umgebung. Damit steht das
|
|
# Sendepasswort nicht in der Datei, die im Git liegt.
|
|
MTX_AUTHINTERNALUSERS_0_PASS: ${MTX_SENDEPASSWORT}
|
|
volumes:
|
|
- ./mediamtx/mediamtx.yml:/mediamtx.yml:ro
|
|
# Die Aufnahmen der Abende — bleiben über Neustarts erhalten
|
|
- ./aufnahmen:/recordings
|
|
# RTMP nach außen für OBS; HLS bleibt intern und läuft über die App
|
|
ports:
|
|
- "1935:1935"
|
|
networks:
|
|
- web
|
|
|
|
networks:
|
|
web:
|
|
external: true
|