Make the app's port configurable via DEVPLACE_PORT

make dev/prod hardcoded uvicorn to port 10500 with no way to override it,
so config.PORT (and everything derived from it - INTERNAL_BASE_URL,
Devii's own base URL defaults) stayed 10500 regardless of what port the
process actually bound to. DEVPLACE_PORT now drives all of it, defaulting
to 10500. Docker's existing PORT var (the externally published port via
nginx) is unrelated and untouched; its app container pins DEVPLACE_PORT
to 10500 explicitly so a bare-metal .env value can never leak in and
desync it from the Dockerfile's fixed internal bind port.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-09-03 08:16:05 +00:00
co-authored by Claude Sonnet 5
parent 3d07a478c3
commit dcd90cc907
9 changed files with 25 additions and 8 deletions
+4
View File
@@ -13,6 +13,10 @@ services:
environment:
HOME: /app
PYTHONDONTWRITEBYTECODE: "1"
# Pinned regardless of .env: the container always binds 10500 internally
# (Dockerfile CMD, nginx upstream). DEVPLACE_PORT is the bare-metal
# `make dev`/`make prod` knob; the externally reachable port is `PORT`.
DEVPLACE_PORT: "10500"
volumes:
- .:/app
expose: