feat(api+web): merge REST API and Blazor UI into single process

Previously the API (heimdall-central) and Blazor UI (heimdall-web) ran as
separate containers with the Blazor Server making internal HTTP calls to
the API. This caused the Blazor circuit to disconnect when the API was
unreachable (network error → "Une erreur réseau est survenue").

Now both serve from the same .NET process on the same port:
- All 16 API controllers, ExceptionFilter, and SignalR hubs integrated
  into Heimdall.Web
- JWT auth, CORS, rate limiting configured in the unified Program.cs
- Dockerfile.central entrypoint runs web/Heimdall.Web.dll
- docker-compose simplified: heimdall-central service removed
- CI publishes heimdall-web image instead of heimdall-central

Also fixes timezone validation on Alpine/tzdata-less environments
and enables FluentValidation auto-validation in the API project.
This commit is contained in:
Arnaud Dartois committed 2026-07-20 10:30:01 +00:00
1 parent 892ca88de8
commit 562aabdfc8
30 files changed
+1969 -99

No files matched your search

+6 -3
View File
@@ -1,5 +1,8 @@
# ─── Heimdall — Environment Variables ──────────────────────────────
# Copy this file to .env and adjust for your deployment
#
# Since the merge of Api + Web into one process, heimdall-web serves
# both the REST API and Blazor UI on the same port (5000).
# Database
DATABASE_URL=Host=postgresql;Port=5432;Database=heimdall;Username=heimdall;Password=heimdall
@@ -13,8 +16,8 @@ JWT__AUDIENCE=heimdall-api
ASPNETCORE_ENVIRONMENT=Production
ASPNETCORE_URLS=http://+:8080
# CORS
Cors__AllowedOrigins=https://localhost:5001,http://localhost:5000
# CORS (default: allow all origins — restrict in production)
Cors__AllowedOrigins=*
# Alarik (S3-compatible object storage)
ALARIK_API_PORT=9000
@@ -27,7 +30,7 @@ ALARIK_JWT=ChangeMeAtLeast32BytesLongKeyInProd!
# SENTRY_DSN=https://key@glitchtip.tordais.cc/6
# Agent (set per agent instance)
Agent__CentralUrl=http://heimdall-central:8080
Agent__CentralUrl=http://heimdall-web:8080
Agent__SiteToken=replace-with-actual-token
Agent__AgentName=agent-01
Agent__HeartbeatIntervalSeconds=30