From a668858d7f92591a4e0fa077e3b6cc152946a8eb Mon Sep 17 00:00:00 2001 From: dingo Date: Fri, 7 Nov 2025 16:42:02 -0500 Subject: [PATCH] SQL HealthCheck --- Program.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Program.cs b/Program.cs index bca9cde..1755149 100644 --- a/Program.cs +++ b/Program.cs @@ -33,7 +33,10 @@ builder.Services.AddOptions() .Validate(o => !string.IsNullOrWhiteSpace(o.ConnectionString), "DB connection string required") .ValidateOnStart(); -// (Optional) health checks / metrics can be added here too. +builder.Services.AddHealthChecks() + .AddCheck("mysql", tags: new[] { "ready" }) + //.AddCheck("redis", tags: new[] { "ready" }) + ; // ---- Build the app AFTER all service registrations ---- var app = builder.Build();