Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,7 @@ FROM mcr.microsoft.com/dotnet/aspnet:latest

WORKDIR /app
COPY --from=build-env /app/out .
RUN apt-get update && apt-get install -y --no-install-recommends curl && rm -rf /var/lib/apt/lists/*
EXPOSE 8080
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 CMD curl -f http://localhost:8080/healthz || exit 1
ENTRYPOINT ["dotnet", "SDMetaUI.dll"]
2 changes: 2 additions & 0 deletions SDMetaUI/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
builder.Services.AddServerSideBlazor();
AddCustomServices(builder);
builder.Services.AddControllers();
builder.Services.AddHealthChecks();

var app = builder.Build();

Expand All @@ -45,6 +46,7 @@

app.MapGet("/images/thumb/{path:required}", ImagesController.GetThumb);
app.MapGet("/images/full/{path:required}/{realfilename}", ImagesController.GetFull);
app.MapHealthChecks("/healthz");

// https://github.com/gmanvel/AspNetCoreSingleFileApp
app.UseStaticFiles(new StaticFileOptions
Expand Down
Loading