Multi-stage backend/Dockerfile (sdk build -> aspnet:10.0 runtime, ~312MB) + docker-compose.prod.yml, additive only — not wired into CI or the existing dev docker-compose.yml (which keeps the SDK image for dotnet run hot-reload). New .dockerignore keeps the build context lean (node_modules alone is ~750MB) since the Dockerfile COPYs from the repo root to pick up public/letter.css (WP-25's FE<->BE letter contract) as a sibling of backend/. Verified for real: built the image, ran it, and curled a live GET /api/v1/brief/preview against the running container — got back the actual rendered letter HTML with letter.css inlined, confirming the walk-up-from-BaseDirectory lookup resolves inside this image layout too. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
15 lines
592 B
YAML
15 lines
592 B
YAML
# WP-30: optional lean deployable backend image — NOT used by the dev demo (docker-compose.yml
|
|
# keeps the SDK image there for `dotnet run` hot-reload; rewriting that one into a prod image
|
|
# would lose the bind-mount hot-reload it's for). This is an additive artifact only, not wired
|
|
# into CI. `docker compose -f docker-compose.prod.yml up --build` → Swagger at :5000/swagger.
|
|
services:
|
|
api:
|
|
build:
|
|
context: .
|
|
dockerfile: backend/Dockerfile
|
|
environment:
|
|
- ASPNETCORE_ENVIRONMENT=Production
|
|
- ASPNETCORE_URLS=http://+:8080
|
|
ports:
|
|
- '5000:8080'
|