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

@@ -43,6 +43,12 @@ public static class DependencyInjection
services.AddScoped<IApplicationDbContext>(sp => sp.GetRequiredService<AppDbContext>());
// Health checks (spec 13.2) — PostgreSQL + dépendances optionnelles.
services.AddHealthChecks()
.AddDbContextCheck<AppDbContext>("postgres", tags: ["ready", "live"])
.AddCheck<Infrastructure.HealthChecks.AlarikHealthCheck>("alarik", tags: ["ready"])
.AddCheck<Infrastructure.HealthChecks.AiHealthCheck>("codeproject-ai", tags: ["live"]);
// Identity
services.AddIdentity<AppUser, AppRole>(options =>
{