I came across a very good article on ASP.NET Core which I needed to bookmark, as it gives a clear and understandable guidance on keeping things working as efficiently as possible.Continue reading ASP.NET Core Guidance
Using DotNet Core comes some responsibilities, one of those is making sure your application is up and running.
Since DotNet Core 2.2 the introductions of health checks have been established.
There are two types of Health Checks
- Liveness Health Checks
- Readiness Health Checks
Here is a working example of a simple Docker file for a .NET Core 3.1 project
FROM mcr.microsoft.com/dotnet/core/sdk:3.1 AS build-env WORKDIR /app COPY project.csproj ./ RUN dotnet restore COPY . ./ RUN dotnet publish -c Release -o out FROM mcr.microsoft.com/dotnet/core/runtime:3.1 WORKDIR /app COPY --from=build-env /app/out . ENTRYPOINT ["dotnet", "project.dll"]