infra+dotnet: fold frontend nginx into backend wwwroot (HOL-20)#103
Merged
Conversation
Drops the dedicated nginx frontend container — the SPA bundle now ships inside the backend image at /app/wwwroot and Kestrel serves it via UseStaticFiles + MapFallbackToFile (so React Router still owns SPA routes). With this change the hobby stack hits its 3-container LEAN target: backend, postgres, clickhouse. The runtime URL substitution from frontend-entrypoint.py is gone too — URLs are now baked at backend image build time via REACT_APP_* build args (defaults all collapse to http://localhost:8082 since backend is the only HTTP surface). For custom-domain deployments, override the build args and rebuild. Removed: frontend.Dockerfile, frontend-entrypoint.py, nginx.conf, compose.dev-frontend.yml. README + .env.example updated. appsettings also drops the leftover Redis/Kafka sections (HOL-22/HOL-23 cleanup). Closes HOL-20. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
6b4f481 to
fd9fa2e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
frontendnginx container — the SPA bundle now ships inside the backend image at/app/wwwrootand Kestrel serves it viaUseStaticFiles+MapFallbackToFile(so React Router still owns SPA routes).backend,postgres,clickhouse. Idle memory measured at ~815 MiB total (84 / 26 / 705).frontend-entrypoint.py). URLs are now baked at backend image build time viaREACT_APP_*build args; defaults all collapse tohttp://localhost:8082since the backend is the only HTTP surface. Custom-domain deployments override the build args and rebuild.frontend.Dockerfile,frontend-entrypoint.py,nginx.conf,compose.dev-frontend.yml. README +.env.exampleupdated.appsettings.jsonalso drops the leftoverRedis/Kafkasections (HOL-22 / HOL-23 cleanup that fell through).Stacked on
issue-23-drop-kafka(HOL-23). Closes HOL-20. Completes the HOL-17 LEAN EPIC.Test plan
dotnet build src/HoldFast.Api/HoldFast.Api.csproj -c Release— greendotnet test— 3,027 tests passdocker compose -f compose.yml -f compose.hobby-dotnet.yml build backend— image 477 MBdocker compose -f compose.yml -f compose.hobby-dotnet.yml up -d— backend / postgres / clickhouse healthyGET /→ 200, returns the SPAindex.htmlGET /assets/icon.ico→ 200 image/x-icon (static file)GET /assets/index.js→ 200 ~6.9 MB text/javascriptGET /assets/index.css→ 200 ~720 KB text/cssGET /sessions/123→ 200 text/html (SPA fallback intact)GET /health→ 200 "Healthy"GET /private,/public→ 301 to GraphQL playground (not shadowed)GET /auth/whoami→ 401 (auth-protected, not shadowed)POST /otel/v1/tracesreachable (not SPA-shadowed)dev@holdfast.local/password🤖 Generated with Claude Code