-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added PUID and PGID environmental variables
- Loading branch information
1 parent
716f4a2
commit 9570894
Showing
3 changed files
with
60 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#!/bin/sh | ||
|
||
echo -e "\033[1;32mTheWicklowWolf\033[0m" | ||
echo -e "\033[1;34mRadaRec\033[0m" | ||
echo "Initializing app..." | ||
|
||
cat << 'EOF' | ||
_____________________________________ | ||
.-'''''-. | ||
.' `. | ||
: : | ||
: : | ||
: _/| : | ||
: =/_/ : | ||
`._/ | .' | ||
( / ,|...-' | ||
\_/^\/||__ | ||
_/~ `""~`"` \_ | ||
__/ -'/ `-._ `\_\__ | ||
/ /-'` `\ \ \-.\ | ||
_____________________________________ | ||
Brought to you by TheWicklowWolf | ||
_____________________________________ | ||
If you'd like to buy me a coffee: | ||
https://buymeacoffee.com/thewicklow | ||
EOF | ||
|
||
PUID=${PUID:-1000} | ||
PGID=${PGID:-1000} | ||
|
||
echo "-----------------" | ||
echo -e "\033[1mRunning with:\033[0m" | ||
echo "PUID=${PUID}" | ||
echo "PGID=${PGID}" | ||
echo "-----------------" | ||
|
||
# Create the required directories with the correct permissions | ||
echo "Setting up directories.." | ||
mkdir -p /radarec/config | ||
chown -R ${PUID}:${PGID} /radarec | ||
|
||
# Start the application with the specified user permissions | ||
echo "Running RadaRec..." | ||
exec su-exec ${PUID}:${PGID} gunicorn src.RadaRec:app -c gunicorn_config.py |