diff --git a/.idea/.idea.Pushy/.idea/jsonSchemas.xml b/.idea/.idea.Pushy/.idea/jsonSchemas.xml new file mode 100644 index 0000000..da430fb --- /dev/null +++ b/.idea/.idea.Pushy/.idea/jsonSchemas.xml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Pushy/Pushy/Program.cs b/Pushy/Pushy/Program.cs index 06f210c..1c4820e 100644 --- a/Pushy/Pushy/Program.cs +++ b/Pushy/Pushy/Program.cs @@ -23,6 +23,8 @@ builder.UseOrleans(silo => builder.Services.AddScoped(); +builder.Services.AddHealthChecks(); + // Add services to the container. builder.Services.AddRazorComponents() .AddInteractiveServerComponents() @@ -58,4 +60,6 @@ app.MapRazorComponents() .AddInteractiveWebAssemblyRenderMode() .AddAdditionalAssemblies(typeof(Pushy.Client._Imports).Assembly); +app.MapHealthChecks("/healthz"); + app.Run(); \ No newline at end of file diff --git a/Pushy/Pushy/Pushy.csproj b/Pushy/Pushy/Pushy.csproj index 9c54b40..eb75f8e 100644 --- a/Pushy/Pushy/Pushy.csproj +++ b/Pushy/Pushy/Pushy.csproj @@ -10,10 +10,12 @@ + + diff --git a/app.json b/app.json new file mode 100644 index 0000000..2dd532e --- /dev/null +++ b/app.json @@ -0,0 +1,13 @@ +{ + "healthchecks": { + "web": [ + { + "type": "startup", + "name": "web check", + "description": "Checking if the app responds to the /health endpoint", + "path": "/healthz", + "attempts": 5 + } + ] + } +} \ No newline at end of file