eee3a83d0e
Bind-Mounts unter volumes: geben dem Container den Geräteknoten, aber keine Device-Cgroup-Erlaubnis — jedes open() scheiterte mit EPERM. Totes disc:-Volume raus (kein udevd legt dort je Symlinks an), depends_on wartet jetzt auf healthy, Worker-read_only bis zur Härtung ausgesetzt (MakeMKV braucht HOME). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
126 lines
3.0 KiB
YAML
126 lines
3.0 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}
|
|
- 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
|
|
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:
|