From aee513ed387635fe3d91feed9c8d393e2eec7e36 Mon Sep 17 00:00:00 2001 From: Artemy <109195690+stalcker2288969@users.noreply.github.com> Date: Sun, 4 Oct 2026 16:29:55 +0700 Subject: [PATCH] Add curl and explicit HTTP Docker healthcheck --- Dockerfile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Dockerfile b/Dockerfile index 209d987..a2a05c2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,8 +11,13 @@ COPY . . RUN dotnet publish Govor.API/Govor.API.csproj -c Release --no-restore -o /app/publish FROM mcr.microsoft.com/dotnet/aspnet:10.0 AS final +RUN apt-get update \ + && apt-get install -y --no-install-recommends curl \ + && rm -rf /var/lib/apt/lists/* WORKDIR /app COPY --from=build /app/publish . ENV ASPNETCORE_HTTP_PORTS=8080 EXPOSE 8080 +HEALTHCHECK --interval=30s --timeout=10s --start-period=20s --retries=3 \ + CMD curl --fail --silent --show-error --max-time 5 http://127.0.0.1:8080/server/ping || exit 1 ENTRYPOINT ["dotnet", "Govor.API.dll"]