Files
immich-folio/docker-entrypoint.sh
ralksta 3a8a890930 fix: resolve permission error when saving gallery config in Docker
The container was running as 'nextjs' (UID 1001) but bind-mounted
./content from the host has host-user ownership, making it unwritable.

Solution: start as root, fix /app/content ownership in entrypoint,
then drop privileges to nextjs via su-exec before running the app.
2026-05-29 17:40:02 +02:00

12 lines
382 B
Bash
Executable File

#!/bin/sh
# Ensure the content directory is writable by the nextjs user (UID 1001).
# This is needed when ./content is bind-mounted from the host.
# Fix ownership of content directory so the app can save config
if [ -d /app/content ]; then
chown -R nextjs:nodejs /app/content 2>/dev/null || true
fi
# Drop privileges and run the app as nextjs
exec su-exec nextjs node server.js