feat(health): health checks complets /health/ready + /health/live (Fixes #13)

- Checks enregistrés : PostgreSQL (ready+live), Alarik S3 (ready),
  CodeProject.AI/Ollama (live) — optionnels → Healthy si non configurés
- Routes : /health (alias /healthz), /health/ready (alias /readyz),
  /health/live → 503 + degradationLevel quand IA dégradée
- Fix CI : dashboard Hangfire skip en Testing (Hangfire désactivé → crash
  au démarrage WebApplicationFactory) — IntegrationTests 125/125 verts
This commit is contained in:
Arnaud Dartois committed 2026-08-12 09:54:37 +02:00
1 parent e3d14eec04
commit 381410510f
6 files changed
+159 -9

No files matched your search

+10 -6
View File
@@ -574,13 +574,17 @@ public partial class Program {
// Hangfire dashboard — Admin uniquement (policy AdminJobs).
// MapHangfireDashboard est utilisé car UseHangfireDashboard avec
// DashboardOptions.Authorization n'existe pas pour les policies ASP.NET.
app.MapHangfireDashboard("/hangfire", new DashboardOptions
// Skip en Testing : Hangfire y est désactivé (pas de AddHangfire).
if (!app.Environment.IsEnvironment("Testing"))
{
Authorization =
[
new HangfireAdminAuthorizationFilter(),
],
});
app.MapHangfireDashboard("/hangfire", new DashboardOptions
{
Authorization =
[
new HangfireAdminAuthorizationFilter(),
],
});
}
app.MapRazorComponents<App>().AddInteractiveServerRenderMode();
app.MapControllers();