13 lines
363 B
Bash
13 lines
363 B
Bash
#!/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 "$@"
|