chore(docker): 暂时移除并注释健康检查配置
- 在 compose.yaml 中注释掉 comcms_network 的健康检查配置以排查问题 - 在 Dockerfile 中注释掉 HEALTHCHECK 指令,因为 aspnet 镜像缺少 curl 命令 - 保留了健康检查相关的配置,以便后续恢复使用 - 保证容器启动逻辑不受影响
This commit is contained in:
@@ -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
|
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
|
WORKDIR /app
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
|
|
||||||
|
|||||||
+6
-5
@@ -63,11 +63,12 @@ services:
|
|||||||
- dataprotection_keys:/home/app/.aspnet/DataProtection-Keys
|
- dataprotection_keys:/home/app/.aspnet/DataProtection-Keys
|
||||||
networks:
|
networks:
|
||||||
- comcms_network
|
- comcms_network
|
||||||
healthcheck:
|
# 暂时禁用健康检查以排查问题
|
||||||
test: [ "CMD", "curl", "-f", "http://localhost:80/" ]
|
# healthcheck:
|
||||||
interval: 30s
|
# test: [ "CMD", "curl", "-f", "http://localhost:80/" ]
|
||||||
timeout: 10s
|
# interval: 30s
|
||||||
retries: 3
|
# timeout: 10s
|
||||||
|
# retries: 3
|
||||||
|
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
|
|||||||
Reference in New Issue
Block a user