Spaces:
Build error
Build error
File size: 646 Bytes
5f56de0 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
#!/bin/sh
# Default values for PUID and PGID
PUID=${PUID:-1000}
PGID=${PGID:-1000}
echo "Using PUID=${PUID} and PGID=${PGID}"
# Modify the appuser and appgroup to match PUID and PGID
if [ "$(id -u appuser)" != "$PUID" ] || [ "$(id -g appuser)" != "$PGID" ]; then
echo "Updating UID and GID for appuser to match PUID:PGID..."
deluser appuser
addgroup -g "$PGID" appgroup
adduser -D -u "$PUID" -G appgroup appuser
fi
# Ensure ownership of /config, /data and /temp are correct
chown -R appuser:appgroup /config /data /temp
# Start the application as appuser
exec su-exec appuser:appgroup gunicorn tubetube.tubetube:app -c srv.py |