3f041f26aa
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.
22 lines
691 B
Bash
Executable File
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 "$@"
|