mirror of
https://github.com/Andre-Bzk/Rezept0r.git
synced 2026-11-15 15:43:04 +01:00
fix: create data subdirectories on first container start
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.
This commit is contained in:
+3
-1
@@ -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).
|
||||
|
||||
Reference in New Issue
Block a user