* force adding user/group even if GID/UID is duplicate

* allow running FPM as root, if needed
testing-php81
Andrew Dolgov 3 years ago
parent 851db2c575
commit c552bb48c9

@ -10,8 +10,14 @@ unset HTTP_PORT
unset HTTP_HOST
if ! id app >/dev/null 2>&1; then
addgroup -g $OWNER_GID app
adduser -D -h /var/www/html -G app -u $OWNER_UID app
# what if i actually need a duplicate GID/UID group?
addgroup -g $OWNER_GID app || echo app:x:$OWNER_GID:app | \
tee -a /etc/group
adduser -D -h /var/www/html -G app -u $OWNER_UID app || \
echo app:x:$OWNER_UID:$OWNER_GID:Linux User,,,:/var/www/html:/bin/ash | tee -a /etc/passwd
fi
update-ca-certificates || true
@ -115,4 +121,4 @@ rm -f /tmp/error.log && mkfifo /tmp/error.log && chown app:app /tmp/error.log
touch $DST_DIR/.app_is_ready
exec /usr/sbin/php-fpm8 --nodaemonize --force-stderr
exec /usr/sbin/php-fpm8 --nodaemonize --force-stderr -R

Loading…
Cancel
Save