radieo/docker-compose.yml
Pierre-Olivier Mercier d302cf1c88
All checks were successful
continuous-integration/drone/push Build is passing
stream: scrobble listened tracks to ListenBrainz
The web player decides when a track counts as listened (caught near its
start and heard to ~90%, capped at 4 min) and triggers POST /scrobble.
The token stays server-side (RADIEO_LISTENBRAINZ_TOKEN), submitting the
listen with the canonical MusicBrainz MBID when available. Each airing is
deduplicated so multiple tabs submit it once.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-04 17:51:41 +08:00

58 lines
2.7 KiB
YAML

services:
ingest:
build: ./ingest
image: registry.nemunai.re/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
- ./config:/config:ro # config éditable sans rebuild (urls.txt yt-dlp)
environment:
- RADIEO_CACHE_DIR=/cache
- RADIEO_STATE_DIR=/state
- RADIEO_HTTP_PORT=8080
# Source OpenSubsonic (Navidrome, Gonic, Airsonic… ; voir .env.example).
# Laisser vide désactive la source : le stream joue alors son cache local.
- RADIEO_SUBSONIC_URL=${RADIEO_SUBSONIC_URL:-}
- RADIEO_SUBSONIC_USER=${RADIEO_SUBSONIC_USER:-}
- RADIEO_SUBSONIC_PASSWORD=${RADIEO_SUBSONIC_PASSWORD:-}
- RADIEO_SUBSONIC_PLAYLIST=${RADIEO_SUBSONIC_PLAYLIST:-}
- RADIEO_RETENTION_KEEP=${RADIEO_RETENTION_KEEP:-20}
# Source yt-dlp : liste d'URL dans config/urls.txt (créer depuis l'exemple).
- RADIEO_YTDLP_URLS_FILE=/config/urls.txt
# Source ListenBrainz : URL du feed de recommandations (ou chemin local
# sous /config, ex. /config/recommendations.xml). Vide désactive la source.
- RADIEO_LISTENBRAINZ_URL=${RADIEO_LISTENBRAINZ_URL:-}
# Dosage du mix entre les sources (0 désactive).
- RADIEO_WEIGHT_SUBSONIC=${RADIEO_WEIGHT_SUBSONIC:-3}
- RADIEO_WEIGHT_YTDLP=${RADIEO_WEIGHT_YTDLP:-1}
- RADIEO_WEIGHT_LISTENBRAINZ=${RADIEO_WEIGHT_LISTENBRAINZ:-2}
# Canonicalizer MusicBrainz (identité MBID inter-sources ; sans clé).
- RADIEO_CANONICAL_ENABLED=${RADIEO_CANONICAL_ENABLED:-1}
- RADIEO_USER_AGENT=${RADIEO_USER_AGENT:-radieo/0.1 (personal music radio)}
healthcheck:
# python-slim n'a ni curl ni wget : on sonde /healthz en Python.
test: ["CMD", "python", "-c",
"import urllib.request; urllib.request.urlopen('http://localhost:8080/healthz')"]
interval: 30s
timeout: 5s
retries: 3
start_period: 10s
restart: unless-stopped
stream:
build: ./stream
image: registry.nemunai.re/radieo/stream
depends_on:
ingest:
condition: service_healthy
environment:
# Scrobbling ListenBrainz : token utilisateur (profil → « User token »).
# Le player déclenche /scrobble ; le token reste ici, jamais exposé au
# navigateur. Laisser vide désactive le scrobbling.
- RADIEO_LISTENBRAINZ_TOKEN=${RADIEO_LISTENBRAINZ_TOKEN:-}
ports:
- "8000:8000" # flux HTTP : http://localhost:8000/radio.mp3
volumes:
- ./cache:/cache:ro # lecture seule : secours + résolution des chemins
- ./jingles:/jingles:ro # jingles intercalés toutes les 2 chansons
restart: unless-stopped