This commit is contained in:
Mikan
2026-06-19 16:48:07 +03:00
parent 5a78def096
commit a69189c85b
4 changed files with 63 additions and 8 deletions

View File

@@ -19,5 +19,9 @@ COPY . .
EXPOSE 8000
# Default: run uvicorn with hot reload for dev
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000", "--reload"]
# 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}"'