fix: update user and group modification logic in entrypoint script (again)
Build and publish Docker image / build-and-push (release) Successful in 19s

This commit is contained in:
2026-07-02 16:36:23 +02:00
parent 624dc336a0
commit b8e7570dc0
+2 -2
View File
@@ -8,14 +8,14 @@ PGID=${PGID:-1001}
if [ "$PGID" != "1001" ]; then
existing_group=$(getent group "$PGID" | cut -d: -f1)
if [ -n "$existing_group" ] && [ "$existing_group" != "nodejs" ]; then
groupdel "$existing_group"
groupmod -g "$((PGID + 50000))" "$existing_group"
fi
groupmod -g "$PGID" nodejs
fi
if [ "$PUID" != "1001" ]; then
existing_user=$(getent passwd "$PUID" | cut -d: -f1)
if [ -n "$existing_user" ] && [ "$existing_user" != "nextjs" ]; then
userdel "$existing_user"
usermod -u "$((PUID + 50000))" "$existing_user"
fi
usermod -u "$PUID" nextjs
fi