From 303f4daacf5bc18acd0a3189a878d45f22e2d1b6 Mon Sep 17 00:00:00 2001 From: Ben Oukhanov Date: Sun, 7 May 2023 23:27:35 +0300 Subject: [PATCH] feat(auth-service): add health checks --- src/auth-service/Authenticator.API/AuthenticatorStartup.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/auth-service/Authenticator.API/AuthenticatorStartup.cs b/src/auth-service/Authenticator.API/AuthenticatorStartup.cs index cfefceb12..9e26cfca2 100644 --- a/src/auth-service/Authenticator.API/AuthenticatorStartup.cs +++ b/src/auth-service/Authenticator.API/AuthenticatorStartup.cs @@ -14,6 +14,8 @@ public class AuthenticatorStartup { public void ConfigureServices(IServiceCollection services) { + services.AddHealthChecks(); + var databaseUrl = Environment.GetEnvironmentVariable("DATABASE_URL"); if (databaseUrl != null) { @@ -42,6 +44,7 @@ public void ConfigureServices(IServiceCollection services) applicationBuilder.UseEndpoints(endpoints => { endpoints.MapControllers(); + endpoints.MapHealthChecks("/healthz"); }); } }