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
|
||||
|
||||
# 安装 curl 用于健康检查
|
||||
USER root
|
||||
RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /app
|
||||
EXPOSE 80
|
||||
|
||||
|
||||
+6
-5
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user