diff --git a/DrSousan.Api/Dockerfile b/DrSousan.Api/Dockerfile index 5ade31e..a5ded5f 100644 --- a/DrSousan.Api/Dockerfile +++ b/DrSousan.Api/Dockerfile @@ -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"]