Deepseekk / start.sh
vikarshana's picture
Create start.sh
5f56de0 verified
raw
history blame contribute delete
646 Bytes
#!/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