Added PUID and PGID environment variable support

This commit is contained in:
Donkie
2023-12-29 11:07:29 +01:00
parent 66189caeb4
commit 0be9ab5a8f
3 changed files with 29 additions and 8 deletions

15
entrypoint.sh Normal file
View File

@@ -0,0 +1,15 @@
#!/bin/sh
PUID=${PUID:-1000}
PGID=${PGID:-1000}
groupmod -o -g "$PGID" app
usermod -o -u "$PUID" app
echo User UID: $(id -u app)
echo User GID: $(id -g app)
echo "Starting uvicorn..."
# Execute the uvicorn command with any additional arguments
exec su-exec "app" uvicorn spoolman.main:app "$@"