mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-07-09 03:04:54 -04:00
fix: re-enable change user and fix SIGTERM (#2882)
* re-enable change user * fix gosu and close #2723
This commit is contained in:
parent
9c0ce1af27
commit
58df50f624
@ -138,4 +138,4 @@ EXPOSE ${APP_PORT}
|
||||
COPY ./docker/entry.sh $MEALIE_HOME/run.sh
|
||||
|
||||
RUN chmod +x $MEALIE_HOME/run.sh
|
||||
ENTRYPOINT $MEALIE_HOME/run.sh
|
||||
ENTRYPOINT ["/app/run.sh"]
|
||||
|
@ -1,13 +1,10 @@
|
||||
# Start Backend API
|
||||
#!/bin/bash
|
||||
|
||||
# Strict Mode
|
||||
# set -e
|
||||
# IFS=$'\n\t'
|
||||
# Start Backend API
|
||||
|
||||
# Get PUID/PGID
|
||||
PUID=${PUID:-911}
|
||||
PGID=${PGID:-911}
|
||||
BASH_SOURCE=${BASH_SOURCE:-$0}
|
||||
|
||||
add_user() {
|
||||
groupmod -o -g "$PGID" abc
|
||||
@ -41,7 +38,7 @@ init() {
|
||||
poetry run python /app/mealie/db/init_db.py
|
||||
}
|
||||
|
||||
# change_user
|
||||
change_user
|
||||
init
|
||||
GUNICORN_PORT=${API_PORT:-9000}
|
||||
|
||||
@ -49,7 +46,7 @@ GUNICORN_PORT=${API_PORT:-9000}
|
||||
hostip=`/sbin/ip route|awk '/default/ { print $3 }'`
|
||||
if [ "$WEB_GUNICORN" = 'true' ]; then
|
||||
echo "Starting Gunicorn"
|
||||
gunicorn mealie.app:app -b 0.0.0.0:$GUNICORN_PORT --forwarded-allow-ips=$hostip -k uvicorn.workers.UvicornWorker -c /app/gunicorn_conf.py --preload
|
||||
exec gunicorn mealie.app:app -b 0.0.0.0:$GUNICORN_PORT --forwarded-allow-ips=$hostip -k uvicorn.workers.UvicornWorker -c /app/gunicorn_conf.py --preload
|
||||
else
|
||||
uvicorn mealie.app:app --host 0.0.0.0 --forwarded-allow-ips=$hostip --port $GUNICORN_PORT
|
||||
exec uvicorn mealie.app:app --host 0.0.0.0 --forwarded-allow-ips=$hostip --port $GUNICORN_PORT
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user