From 8e8c03891a17798067a8da0a034725bf44ece8d0 Mon Sep 17 00:00:00 2001 From: Christian Cleberg Date: Wed, 15 Jul 2026 11:13:25 -0500 Subject: fix: refuse to start when the cache directory is not writable An unwritable cache directory degraded silently: media still served, because the download succeeds before the cache write is attempted, so the only symptom was one "permission denied" line per request and a cache that never filled. Every request re-fetched from the CDN. Probe the directory at startup and exit with the uid and the chown that fixes it. The container image runs as uid 10000, which is the usual cause with a bind-mounted cache, so say so in the message and in both compose examples. --- compose.example.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'compose.example.yaml') diff --git a/compose.example.yaml b/compose.example.yaml index 2e2f088..d7c20ea 100755 --- a/compose.example.yaml +++ b/compose.example.yaml @@ -14,4 +14,7 @@ services: - no-new-privileges:true volumes: - ./config.json:/config.json:ro - - ./cache:/cache # Ensure cache folder has a 10000:10000 ownership. + # The image runs as uid 10000, so the host cache dir must be writable by it: + # mkdir -p cache && sudo chown -R 10000:10000 cache + # Without this the container exits at startup telling you the same thing. + - ./cache:/cache -- cgit v1.2.3