From 77c63770c34420279e11f0b8863e22acd7e1120f Mon Sep 17 00:00:00 2001 From: Andre <200930841+Andre-Bzk@users.noreply.github.com> Date: Fri, 14 Aug 2026 16:20:54 +0200 Subject: [PATCH] fix: create data subdirectories on first container start MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On a host that has never run the service, the mounted data volume is empty. Ownership was being corrected for a subdirectory that did not exist yet, which aborted the entrypoint before the application started — exactly the situation a fresh deployment creates, and the reason the container came up on the existing Pi but would not have elsewhere. Creating the directory has to happen at runtime rather than during the build, because the volume mount hides whatever the image places there. --- entrypoint.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/entrypoint.sh b/entrypoint.sh index 5d673d6..28ee2f7 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -4,7 +4,9 @@ set -e APP_UID=${APP_UID:-1000} APP_GID=${APP_GID:-1000} -# Fix ownership of mounted volumes so the app user can write to them +# Mounted volumes start out empty on a fresh host, and a mount hides anything the +# image created at these paths — so create the directories here, not at build time +mkdir -p /app/tmp /app/data/images chown "${APP_UID}:${APP_GID}" /app/tmp /app/data /app/data/images # Self-update yt-dlp on every container start (Instagram/TikTok break old versions).