Run as root by default

Optionally run as another user/group only if
the env vars are specified. Should give flexibility
to those who need to run processes as root and open ports
without having to request additional priveleges
This commit is contained in:
Jamie Curnow committed 2023-03-30 09:04:37 +10:00
1 parent d5ed70dbb6
commit 56a92e5c0e
8 files changed
+87 -50

No files matched your search

@@ -5,6 +5,10 @@ set -e
. /bin/common.sh
log_info 'Starting nginx ...'
exec s6-setuidgid npmuser nginx
if [ "$PUID" = '0' ]; then
log_info 'Starting nginx ...'
exec nginx
else
log_info "Starting nginx as npmuser ($PUID) ..."
exec s6-setuidgid npmuser nginx
fi