Skip to content

infra+dotnet: fold frontend nginx into backend wwwroot (HOL-20)#103

Merged
BrewingCoder merged 1 commit into
mainfrom
issue-20-frontend-into-backend
May 9, 2026
Merged

infra+dotnet: fold frontend nginx into backend wwwroot (HOL-20)#103
BrewingCoder merged 1 commit into
mainfrom
issue-20-frontend-into-backend

Conversation

@BrewingCoder
Copy link
Copy Markdown
Owner

Summary

  • Drops the dedicated frontend nginx 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 the 3-container LEAN target: backend, postgres, clickhouse. Idle memory measured at ~815 MiB total (84 / 26 / 705).
  • Drops runtime URL substitution (frontend-entrypoint.py). URLs are now baked at backend image build time via REACT_APP_* build args; defaults all collapse to http://localhost:8082 since the backend is the only HTTP surface. 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.json also drops the leftover Redis/Kafka sections (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 — green
  • dotnet test — 3,027 tests pass
  • docker compose -f compose.yml -f compose.hobby-dotnet.yml build backend — image 477 MB
  • docker compose -f compose.yml -f compose.hobby-dotnet.yml up -d — backend / postgres / clickhouse healthy
  • GET / → 200, returns the SPA index.html
  • GET /assets/icon.ico → 200 image/x-icon (static file)
  • GET /assets/index.js → 200 ~6.9 MB text/javascript
  • GET /assets/index.css → 200 ~720 KB text/css
  • GET /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/traces reachable (not SPA-shadowed)
  • Browser smoke: log in to the dashboard at http://localhost:8082 with dev@holdfast.local / password

🤖 Generated with Claude Code

@BrewingCoder BrewingCoder changed the base branch from issue-23-drop-kafka to main May 9, 2026 14:39
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>
@BrewingCoder BrewingCoder force-pushed the issue-20-frontend-into-backend branch from 6b4f481 to fd9fa2e Compare May 9, 2026 14:43
@BrewingCoder BrewingCoder merged commit e6351d1 into main May 9, 2026
4 checks passed
@BrewingCoder BrewingCoder deleted the issue-20-frontend-into-backend branch May 9, 2026 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant