From 9e0f4c20661e45ab0ffef4bfce0edbfc51cac6e4 Mon Sep 17 00:00:00 2001 From: Pierre-Olivier Mercier Date: Thu, 2 Jul 2026 22:47:05 +0800 Subject: [PATCH] compose: healthcheck on ingest, stream waits for it Add a Docker healthcheck probing ingest's /healthz (via python, since the slim image has neither curl nor wget) and make the stream start only once ingest is service_healthy, so it never briefly falls back on an empty cache at boot. Co-Authored-By: Claude Opus 4.8 --- docker-compose.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 24f1730..7ada3d7 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -29,13 +29,22 @@ services: # 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: radieo-stream depends_on: - - ingest + ingest: + condition: service_healthy ports: - "8000:8000" # flux HTTP : http://localhost:8000/radio.mp3 volumes: