diff --git a/COMCMS.Web/Dockerfile b/COMCMS.Web/Dockerfile index 0b95944..712dec2 100644 --- a/COMCMS.Web/Dockerfile +++ b/COMCMS.Web/Dockerfile @@ -28,6 +28,11 @@ RUN dotnet publish "COMCMS.Web.csproj" -c Release -o /app/publish /p:UseAppHost= # 运行时阶段 FROM mcr.microsoft.com/dotnet/aspnet:10.0 AS base + +# 安装 curl 用于健康检查 +USER root +RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/* + WORKDIR /app EXPOSE 80 diff --git a/compose.yaml b/compose.yaml index a4a10db..6c0a896 100644 --- a/compose.yaml +++ b/compose.yaml @@ -63,11 +63,12 @@ services: - dataprotection_keys:/home/app/.aspnet/DataProtection-Keys networks: - comcms_network - healthcheck: - test: [ "CMD", "curl", "-f", "http://localhost:80/" ] - interval: 30s - timeout: 10s - retries: 3 + # 暂时禁用健康检查以排查问题 + # healthcheck: + # test: [ "CMD", "curl", "-f", "http://localhost:80/" ] + # interval: 30s + # timeout: 10s + # retries: 3 volumes: