Small refactor of user/groups and add checks during startup. Only use -x in bash scripts when DEBUG=true set in env vars

This commit is contained in:
Jamie Curnow
2023-05-04 10:03:06 +10:00
parent a1245bc161
commit c432c34fb3
14 changed files with 70 additions and 45 deletions

View File

@ -8,14 +8,14 @@ set -e
if [ "$DEVELOPMENT" = 'true' ]; then
. /bin/common.sh
cd /app/frontend || exit 1
HOME=/tmp/npmuserhome
HOME=$NPMHOME
export HOME
mkdir -p /app/frontend/dist
chown -R "$PUID:$PGID" /app/frontend/dist
log_info 'Starting frontend ...'
s6-setuidgid npmuser yarn install
exec s6-setuidgid npmuser yarn watch
s6-setuidgid "$PUID:$PGID" yarn install
exec s6-setuidgid "$PUID:$PGID" yarn watch
else
exit 0
fi