Files
medassist-ng/frontend/nginx-entrypoint.sh
T
Daniel Volz 3f041f26aa feat: respect LOG_LEVEL in frontend nginx container (#212)
Add entrypoint wrapper that translates LOG_LEVEL into nginx
access_log control. When LOG_LEVEL is warn or higher, nginx
access logs are suppressed. The frontend container now receives
LOG_LEVEL via env_file (.env) — no new env vars needed.
2026-02-14 21:04:45 +01:00

22 lines
691 B
Bash
Executable File

#!/bin/sh
# =============================================================================
# Frontend entrypoint wrapper
# Translates LOG_LEVEL into nginx access log control before
# delegating to the standard nginx-unprivileged entrypoint.
#
# LOG_LEVEL=debug|info → access logs enabled (default)
# LOG_LEVEL=warn|error|fatal|silent → access logs suppressed
# =============================================================================
case "${LOG_LEVEL:-info}" in
warn|error|fatal|silent)
export NGINX_ACCESS_LOG="off"
;;
*)
export NGINX_ACCESS_LOG="/dev/stdout"
;;
esac
# Delegate to the original nginx-unprivileged entrypoint
exec /docker-entrypoint.sh "$@"