mirror of
https://github.com/rommapp/romm.git
synced 2026-06-28 06:46:00 +00:00
changes from bot review
This commit is contained in:
@@ -40,8 +40,10 @@ export ROMM_BASE_PATH=${ROMM_BASE_PATH:-/romm}
|
||||
export ROMM_PORT=${ROMM_PORT:-8080}
|
||||
|
||||
# Disable nginx access logs when log level is WARNING, ERROR, or CRITICAL
|
||||
case "${LOGLEVEL:-INFO}" in
|
||||
WARNING | ERROR | CRITICAL | warning | error | critical)
|
||||
loglevel="${LOGLEVEL:-INFO}"
|
||||
loglevel="${loglevel^^}"
|
||||
case "${loglevel}" in
|
||||
WARNING | WARN | ERROR | CRITICAL)
|
||||
export NGINX_ACCESS_LOG="access_log off;"
|
||||
;;
|
||||
*)
|
||||
|
||||
@@ -93,6 +93,10 @@ start_bin_gunicorn() {
|
||||
# cleanup potentially leftover socket
|
||||
rm /tmp/gunicorn.sock -f
|
||||
|
||||
# Wire LOGLEVEL into Gunicorn's logging config so it respects the env var
|
||||
local gunicorn_level="${LOGLEVEL^^}"
|
||||
sed -i '/\[logger_gunicorn\]/,/^\[/ s/^level=.*/level='"${gunicorn_level}"'/' /etc/gunicorn/logging.conf
|
||||
|
||||
# commands to start our main application and store its PID to check for crashes
|
||||
info_log "Starting backend"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user