5528e0f652
- clients/omdb.py: OMDb als zweite Quelle (Fallback-Kette: TMDB exakt ->
OMDb -> bester TMDB-Vorschlag mit niedriger Confidence -> unknown)
- Pre-Scan-Reparatur: Titel kam nie an — makemkvcon existiert nur im
Worker, isosize war nirgends installiert (fiel still auf "DVD" zurueck).
Jetzt: ISO-9660-Volume-Label direkt vom Medium + Label-Normalisierung
(PULP_FICTION -> Pulp Fiction), Disc-Typ ueber zentrale detection.py
- POST /devices/{name}/eject (CDROMEJECT-ioctl) mit Job-Schutz (409 wenn
auf dem Laufwerk gerade gerippt wird)
- OMDB_API_KEY in compose/.env.example; .env.example komplett ehrlich
dokumentiert (JWT-Pflicht, MakeMKV-Beta-Key-Rhythmus)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
133 lines
3.4 KiB
YAML
133 lines
3.4 KiB
YAML
# Docker Compose für Rippy
|
|
#
|
|
# Geräte-Zugriff (22.07./23.07.-Lehre): Optische Laufwerke MÜSSEN als devices:
|
|
# eingebunden werden. Bind-Mounts unter volumes: geben dem Container zwar den
|
|
# Geräteknoten, aber KEINE Berechtigung im Device-Cgroup → jedes open() scheitert
|
|
# mit EPERM. Voraussetzung: Die VM sieht das Laufwerk (USB-Passthrough auf pve).
|
|
|
|
services:
|
|
api:
|
|
build:
|
|
context: .
|
|
dockerfile: docker/api/Dockerfile
|
|
environment:
|
|
- DATABASE_URL=postgresql://rippy:rippy@postgres:5432/rippy
|
|
- REDIS_URL=redis://redis:6379/0
|
|
- TMDB_API_KEY=${TMDB_API_KEY}
|
|
- THETVDB_API_KEY=${THETVDB_API_KEY}
|
|
- OMDB_API_KEY=${OMDB_API_KEY}
|
|
- JWT_SECRET_KEY=${JWT_SECRET_KEY}
|
|
- LOG_LEVEL=INFO
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "python -c 'import urllib.request; urllib.request.urlopen(\"http://localhost:8000/health\")'"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 10s
|
|
ports:
|
|
- "8000:8000"
|
|
volumes:
|
|
- media:/app/media
|
|
- temp:/app/temp
|
|
devices:
|
|
- /dev/sr0:/dev/sr0
|
|
networks:
|
|
- rippy-net
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_healthy
|
|
restart: unless-stopped
|
|
read_only: false
|
|
|
|
worker:
|
|
build:
|
|
context: .
|
|
dockerfile: docker/worker/Dockerfile
|
|
environment:
|
|
- DATABASE_URL=postgresql://rippy:rippy@postgres:5432/rippy
|
|
- REDIS_URL=redis://redis:6379/0
|
|
- RIP_OUTPUT_DIR=/app/media
|
|
- MAKEMKV_APP_KEY=${MAKEMKV_APP_KEY}
|
|
- LOG_LEVEL=INFO
|
|
volumes:
|
|
- media:/app/media
|
|
- temp:/app/temp
|
|
devices:
|
|
- /dev/sr0:/dev/sr0
|
|
# MakeMKV spricht Laufwerke über die SCSI-Generic-Schicht an — ohne den
|
|
# sg-Knoten findet es „keine usable optical drives" (Deploy-Befund 23.07.).
|
|
# In dieser VM: sg0 = Systemplatte, sg1 = das BD-Laufwerk. Achtung: nach
|
|
# einem USB-Reconnect zur Laufzeit kann die sg-Nummer wandern → Container
|
|
# neu starten.
|
|
- /dev/sg1:/dev/sg1
|
|
networks:
|
|
- rippy-net
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_healthy
|
|
restart: unless-stopped
|
|
# read_only bleibt Ziel (Etappe 6), aber MakeMKV/abcde brauchen HOME +
|
|
# Settings — bis zur Härtung schreibbar, Ausgabe geht ohnehin aufs Volume.
|
|
read_only: false
|
|
tmpfs:
|
|
- /app/tmp
|
|
- /run
|
|
- /tmp
|
|
|
|
ui:
|
|
build:
|
|
context: .
|
|
dockerfile: docker/ui/Dockerfile
|
|
ports:
|
|
- "80:80"
|
|
networks:
|
|
- rippy-net
|
|
depends_on:
|
|
- api
|
|
restart: unless-stopped
|
|
|
|
postgres:
|
|
image: postgres:16-alpine
|
|
environment:
|
|
- POSTGRES_USER=rippy
|
|
- POSTGRES_PASSWORD=rippy
|
|
- POSTGRES_DB=rippy
|
|
volumes:
|
|
- postgres-data:/var/lib/postgresql/data
|
|
networks:
|
|
- rippy-net
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U rippy -d rippy"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
redis:
|
|
image: redis:7-alpine
|
|
volumes:
|
|
- redis-data:/data
|
|
networks:
|
|
- rippy-net
|
|
restart: unless-stopped
|
|
command: redis-server --appendonly yes
|
|
healthcheck:
|
|
test: ["CMD", "redis-cli", "ping"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
networks:
|
|
rippy-net:
|
|
driver: bridge
|
|
|
|
volumes:
|
|
media:
|
|
temp:
|
|
postgres-data:
|
|
redis-data:
|