feat(broker): add RabbitMQ + MassTransit job broker for cross-site analysis
Mutualise les ressources IA/GPU entre sites via un broker de jobs durable.
RabbitMQ + MassTransit avec connexion AMQP sortante (pas de port entrant).
- Heimdall.Contracts: contrats de messages partagés
- RabbitMQ: conteneur docker + credentials via env vars
- MassTransit Central: publication de jobs d'analyse
- MassTransit Agent: consommateur avec backpressure GPU
Fixes#72
- Compose (dev+prod): agent on host network (bridge 172.x was skipped by the
scanner), listen on 8081 (ntfy owns 8080), CentralUrl via host/domain,
healthcheck adapted, no Docker DNS
- Scanner: skip the LAN gateway (NAT router, never a camera); wider camera
ports (+34567/34568 Imou SDK, +8000 Hikvision SDK); 750 ms port timeout;
keep only devices with real camera evidence; RTSP OPTIONS + MJPEG
content-type probes prove live streams from the agent (it is on the LAN)
- Central: drop Unknown devices (nginx/gunicorn/gateway) on submit; classify
37777 DVRIP as Standard camera (not NVR), 8899 alone as NVR; persist
agent-tested stream URLs flagged IsAlive; shared CameraStreamTemplates
with the agent so both build identical candidate URLs
- UI: discoveries popup auto-selects the agent-verified main stream — no
manual stream choice
- SameOriginHttpMessageHandler: quand Kestrel écoute sur une wildcard
(0.0.0.0 / [::] — ASPNETCORE_URLS=http://+:8080 en conteneur), résoudre
l'origine interne vers http://localhost:<port> au lieu de l'adresse
anycast que le HttpClient ne peut pas joindre
- docker-compose.prod.yml: API_BASE_URL explicite (http://localhost:8080)
pour que les appels internes du circuit Blazor ciblent le listener du
conteneur et non le port hôte vu par le navigateur
- docker-compose.local.yml: override pour déployer l'image locale tant
que les fixes ne sont pas publiés sur Docker Hub par la CI
- .gitignore: exclut les .env (secrets JWT/mots de passe)
Vérifié par smoke test Playwright contre la prod (127.0.0.1:5010) :
login UI → dashboard, page users, création d'utilisateur, logout : 5/5
- Nouveau NtfyService: topic isolé par user (heimdall_{userId})
- Configuration globale Ntfy:BaseUrl + Ntfy:Token (plus de token par user)
- Renommage UserNotificationConfig: Gotify* → Ntfy*
- Migration des colonnes DB: gotify_enabled/url/token → ntfy_enabled/url
- Ajout service ntfy dans docker-compose (binwiederhier/ntfy)
- Mise à jour .env.example avec NTFY__BASE_URL et NTFY__TOKEN
- Suppression GotifyService et IGotifyService
- Add JWT__RefreshKey to .env.example with documentation
- Add JWT__RefreshKey to docker-compose.yml and docker-compose.prod.yml
- Fix JwtService to check both IConfiguration and env vars (JWT__REFRESHKEY)
for access token key and refresh token key, matching Program.cs pattern
- Fixes 'Jwt:RefreshKey is not configured' 500 error on register/login
Combine Heimdall.Web and Heimdall.Workers into one process/image.
Hangfire background jobs now run inside the web process.
- Move job classes to Infrastructure/Jobs/ (no Worker SDK dependency)
- Add Hangfire server + recurring jobs to Web/Program.cs
- Add missing AddInfrastructure/AddApplication DI registrations to Web
- Rename image: heimdall (was heimdall-web / heimdall-workers)
- Remove src/Heimdall.Workers project entirely
- Remove tests/Heimdall.Workers.Tests (placeholder)
- Simplify Dockerfile: single build target, no workers publish
- Update docker-compose files: one service heimdall, no workers
- Update Makefile, .env.example
Mounts heimdall_data volume at /var/lib/heimdall for heimdall-web
and heimdall-workers services. Prevents loss of DP keys on container
destroy, which would permanently break credential decryption.
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.
Static files are served from /app/wwwroot but the web publish
output is at /app/web/. Copying wwwroot to the expected location
so StaticFileMiddleware can find CSS, JS, and other static assets.
Content root was /app/ but published files are at /app/web/,
causing StaticFileMiddleware to look for wwwroot at /app/wwwroot/
which doesn't exist. Add working_dir to set correct content root.
- Fix docker-compose.prod.yml: agent image ref
(heimdall-central→heimdall-agent) and env var naming
(HEIMDALL_* → Agent__*)
- Add missing SENTRY_DSN env vars to central, workers,
web, and agent services
- Add agent_state volume for agent identity persistence
- Update README with accurate test counts (34→225),
env var reference table, troubleshooting guide,
and proper docker documentation
- Update docker-compose.yml header and add
Agent__StateDirectory/Agent__RegistrationMaxRetries
The Dockerfile.central already compiled Heimdall.Web but it was never
deployed as a service. Add heimdall-web service using the same image
with entrypoint overridden to dotnet web/Heimdall.Web.dll.
- Expose port 5001 for the Blazor Server UI
- API_BASE_URL points to heimdall-central:8080 for server-side HTTP calls
- Healthcheck on root / returns 200 once the Blazor circuit is ready
Alarik is a drop-in S3-compatible replacement requiring no application
code changes. All S3 APIs (upload, download, list, delete, multipart)
are fully supported.