fix: replace dotnet healthcheck with curl probe for reliable self-healing
CI/CD / CI · dotnet build (push) Successful in 35s
CI/CD / Deploy · drsousan (push) Successful in 12s

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
soroush.asadi
2026-05-31 19:39:04 +03:30
parent d5bb724b3f
commit 14f902cdad
+3 -2
View File
@@ -37,8 +37,9 @@ VOLUME ["/data", "/app/wwwroot/uploads"]
ENV ASPNETCORE_URLS=http://+:8080
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 \
CMD ["dotnet", "DrSousan.Api.dll", "--healthcheck"]
CMD curl -f http://localhost:8080/healthz || exit 1
ENTRYPOINT ["dotnet", "DrSousan.Api.dll"]