Files
tally-counter/entrypoint.sh
T

18 lines
318 B
Bash

#!/bin/sh
set -e
PUID=${PUID:-1001}
PGID=${PGID:-1001}
# Only remap if the requested IDs differ from the defaults baked into the image
if [ "$PGID" != "1001" ]; then
groupmod -g "$PGID" nodejs
fi
if [ "$PUID" != "1001" ]; then
usermod -u "$PUID" nextjs
fi
chown -R nextjs:nodejs /data
exec su-exec nextjs "$@"