radieo/docker-compose.yml
Pierre-Olivier Mercier 8c27498632 Milestone 3: Navidrome (OpenSubsonic) playback provider
Replace the directory-scan queue with a real ingestion pipeline:
provider -> fetcher -> cache -> ready queue, driven by a background
prefetch thread.

- subsonic.py: minimal OpenSubsonic client (salted-token auth,
  getPlaylists/getPlaylist, raw streaming download).
- providers/navidrome.py: pick tracks from a playlist (by name or id),
  with anti-repeat and periodic playlist reload.
- fetchers/subsonic.py: atomic download into the shared cache.
- db.py: SQLite state — append-only play history (anti-repeat + stats)
  and cache_files LRU retention (keep the N most recently played).
- queue.py: prefetch buffer + retention on play; graceful degradation
  to the stream's local-cache fallback when no source is configured.
- api.py: GET /next now carries real title/artist metadata.
- Config via .env (Navidrome credentials), persistent state/ volume,
  httpx dependency.

Verified end-to-end against a live Navidrome: playlist resolved,
tracks downloaded and broadcast, retention and history correct.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-02 17:57:38 +08:00

30 lines
1.1 KiB
YAML

services:
ingest:
build: ./ingest
image: radieo-ingest
volumes:
- ./cache:/cache # volume partagé avec le stream (rw : téléchargements)
- ./state:/state # état persistant (SQLite) hors du cache éphémère
environment:
- RADIEO_CACHE_DIR=/cache
- RADIEO_STATE_DIR=/state
- RADIEO_HTTP_PORT=8080
# Source Navidrome / OpenSubsonic (voir .env / .env.example).
# Laisser vide désactive la source : le stream joue alors son cache local.
- RADIEO_NAVIDROME_URL=${RADIEO_NAVIDROME_URL:-}
- RADIEO_NAVIDROME_USER=${RADIEO_NAVIDROME_USER:-}
- RADIEO_NAVIDROME_PASSWORD=${RADIEO_NAVIDROME_PASSWORD:-}
- RADIEO_NAVIDROME_PLAYLIST=${RADIEO_NAVIDROME_PLAYLIST:-}
- RADIEO_RETENTION_KEEP=${RADIEO_RETENTION_KEEP:-20}
restart: unless-stopped
stream:
build: ./stream
image: radieo-stream
depends_on:
- ingest
ports:
- "8000:8000" # flux HTTP : http://localhost:8000/radio.mp3
volumes:
- ./cache:/cache:ro # lecture seule : secours + résolution des chemins
restart: unless-stopped