mirror of
https://github.com/zoriya/Kyoo.git
synced 2026-05-31 03:15:16 -04:00
Add healthchecks to the api
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks.EntityFrameworkCore" Version="5.0.7" />
|
||||
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="5.0.7" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="5.0.8" />
|
||||
</ItemGroup>
|
||||
|
||||
@@ -91,6 +91,8 @@ namespace Kyoo.Postgresql
|
||||
if (_environment.IsDevelopment())
|
||||
x.EnableDetailedErrors().EnableSensitiveDataLogging();
|
||||
}, ServiceLifetime.Transient);
|
||||
|
||||
services.AddHealthChecks().AddDbContextCheck<DatabaseContext>();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user