Fix media permissions inside app container
Release / promote-and-deploy (push) Canceled after 0s
CI / test (push) Canceled after 0s
CI / build-image (push) Canceled after 0s

This commit is contained in:
2026-09-18 02:22:15 +02:00
parent 46a7cc23bd
commit 82a89cd3d9
2 changed files with 18 additions and 2 deletions
+12
View File
@@ -0,0 +1,12 @@
#!/bin/sh
set -eu
# /app/media is a persistent host bind mount in production. Its host owner
# can differ from the unprivileged application user inside the image, so fix
# the mount ownership before dropping privileges for the actual app process.
if [ -d /app/media ]; then
chown -R nextjs:nodejs /app/media
chmod 775 /app/media
fi
exec su-exec nextjs "$@"