fix: replace dotnet healthcheck with curl probe for reliable self-healing
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -37,8 +37,9 @@ VOLUME ["/data", "/app/wwwroot/uploads"]
|
|||||||
ENV ASPNETCORE_URLS=http://+:8080
|
ENV ASPNETCORE_URLS=http://+:8080
|
||||||
ENV ASPNETCORE_ENVIRONMENT=Production
|
ENV ASPNETCORE_ENVIRONMENT=Production
|
||||||
|
|
||||||
# Self-probe via the app's own runtime — the aspnet image has no curl/wget.
|
RUN apt-get update -qq && apt-get install -y --no-install-recommends curl && rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
HEALTHCHECK --interval=15s --timeout=10s --start-period=30s --retries=3 \
|
HEALTHCHECK --interval=15s --timeout=10s --start-period=30s --retries=3 \
|
||||||
CMD ["dotnet", "DrSousan.Api.dll", "--healthcheck"]
|
CMD curl -f http://localhost:8080/healthz || exit 1
|
||||||
|
|
||||||
ENTRYPOINT ["dotnet", "DrSousan.Api.dll"]
|
ENTRYPOINT ["dotnet", "DrSousan.Api.dll"]
|
||||||
|
|||||||
Reference in New Issue
Block a user