SPA checks for its dependences on healthcheck

This commit is contained in:
Eduard Tomas 2017-04-07 10:49:28 +02:00
parent a12a53b44e
commit 97d8e80294
2 changed files with 5 additions and 1 deletions

View File

@ -9,6 +9,7 @@ namespace eShopConContainers.WebSPA
{
var host = new WebHostBuilder()
.UseKestrel()
.UseHealthChecks("/hc")
.UseContentRoot(Directory.GetCurrentDirectory())
.UseIISIntegration()
.UseStartup<Startup>()

View File

@ -43,7 +43,10 @@ namespace eShopConContainers.WebSPA
{
services.AddHealthChecks(checks =>
{
checks.AddValueTaskCheck("HTTP Endpoint", () => new ValueTask<IHealthCheckResult>(HealthCheckResult.Healthy("Ok")));
checks.AddUrlCheck(Configuration["CatalogUrl"]);
checks.AddUrlCheck(Configuration["OrderingUrl"]);
checks.AddUrlCheck(Configuration["BasketUrl"]);
checks.AddUrlCheck(Configuration["IdentityUrl"]);
});
services.Configure<AppSettings>(Configuration);