diff --git a/Dockerfile.backend b/Dockerfile.backend index 51a5a69..fdc12fa 100644 --- a/Dockerfile.backend +++ b/Dockerfile.backend @@ -34,4 +34,4 @@ COPY backend/ . EXPOSE 8000 # Default command - can be overridden in compose for development -CMD ["uvicorn", "backend.main:app", "--host", "0.0.0.0", "--port", "8000"] +CMD ["uvicorn", "backend.main:app", "--app-dir", "/app/src", "--host", "0.0.0.0", "--port", "8000"] diff --git a/compose.dev.yml b/compose.dev.yml index 2c99cb3..2ffb871 100644 --- a/compose.dev.yml +++ b/compose.dev.yml @@ -23,6 +23,8 @@ services: command: - "uvicorn" - "backend.main:app" + - "--app-dir" + - "/app/src" - "--host" - "0.0.0.0" - "--port" diff --git a/docs/DEPLOYABLE_RUNTIME_CONTRACT.md b/docs/DEPLOYABLE_RUNTIME_CONTRACT.md index e5123ac..0c33cd2 100644 --- a/docs/DEPLOYABLE_RUNTIME_CONTRACT.md +++ b/docs/DEPLOYABLE_RUNTIME_CONTRACT.md @@ -31,7 +31,7 @@ Excluded: - Container build source: `Dockerfile.backend`. - Runtime base image: `python:3.14-slim`. -- Runtime process: `uvicorn backend.main:app --host 0.0.0.0 --port 8000`. +- Runtime process: `uvicorn backend.main:app --app-dir /app/src --host 0.0.0.0 --port 8000`. - Exposed runtime port: `8000`. ### Required Runtime Dependencies @@ -68,7 +68,7 @@ The lockfile in `backend/uv.lock` is the dependency source of truth. ### Backend Runtime Checklist - [ ] Runtime image built from `Dockerfile.backend`. -- [ ] Runtime process is uvicorn serving `backend.main:app` on `0.0.0.0:8000`. +- [ ] Runtime process is uvicorn serving `backend.main:app` with app dir `/app/src` on `0.0.0.0:8000`. - [ ] `DATABASE_URL` is set in deployment runtime. - [ ] `GET /health` behavior matches contract. - [ ] Startup fails on runtime policy mismatch.