chore(tradein): drop uvicorn --reload in prod (WatchFiles overhead) #641

Merged
Light1YT merged 1 commit from chore/tradein-prod-no-uvicorn-reload into main 2026-05-29 08:32:35 +00:00

1 commit

Author SHA1 Message Date
a4603d64c8 chore(tradein): drop uvicorn --reload in prod (WatchFiles overhead)
Dockerfile CMD carries `--reload` for dev hot-reload (app/ bind-mounted in
docker-compose.yml). In prod the same image ran with --reload too — prod logs
showed "Started reloader process [1] using WatchFiles" — wasting a file-watcher
and risking a reload mid-request on an immutable image.

Add a prod-only `command:` override running uvicorn without --reload. Keep it a
single worker (no --workers): the in-app scheduler (app.services.scheduler,
tick=60s) lives in the backend process, so multiple workers would duplicate
scheduled jobs (cian/rosreestr would fire N times). Dev is untouched (no command
override there → still inherits the Dockerfile --reload).
2026-05-29 13:31:57 +05:00