mirror of
https://github.com/Govor-team/Govor.git
synced 2026-11-16 20:56:03 +00:00
Add curl and explicit HTTP Docker healthcheck
This commit is contained in:
@@ -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"]
|
||||
|
||||
Reference in New Issue
Block a user