From 5202b30e0abbacdd0b750f59e6c77d49d3bcfb81 Mon Sep 17 00:00:00 2001 From: Mikan <72257910+Mikan-DS@users.noreply.github.com> Date: Fri, 19 Jun 2026 16:51:42 +0300 Subject: [PATCH] fix --- backend/Dockerfile | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/backend/Dockerfile b/backend/Dockerfile index 719eac6..9fccbc4 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -20,8 +20,10 @@ COPY . . EXPOSE 8000 # Default: run uvicorn with hot reload for dev. -# We pass --log-level explicitly from $LOG_LEVEL so uvicorn's own loggers -# (uvicorn, uvicorn.access) start at the right level from the very first -# request — without this, they stay at INFO until our lifespan runs. -# Shell form (not exec form) so ${LOG_LEVEL} is interpolated by the shell. -CMD sh -c 'exec uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload --log-level "${LOG_LEVEL:-info}"' +# We pass --log-level explicitly from $LOG_LEVEL (lowercased) so uvicorn's own +# loggers (uvicorn, uvicorn.access) start at the right level from the very +# first request — without this, they stay at INFO until our lifespan runs. +# uvicorn only accepts lowercase values ('critical'|'error'|'warning'|'info'|'debug'|'trace'), +# so we pipe through `tr` to lowercase. Shell form (not exec form) for ${LOG_LEVEL} +# interpolation. +CMD sh -c 'LVL="${LOG_LEVEL:-info}"; exec uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload --log-level "$(printf "%s" "$LVL" | tr "A-Z" "a-z")"'