diff --git a/frontend/admin-web/Dockerfile b/frontend/admin-web/Dockerfile index f686ae92..f7220c26 100644 --- a/frontend/admin-web/Dockerfile +++ b/frontend/admin-web/Dockerfile @@ -31,8 +31,8 @@ WORKDIR /app ENV NODE_ENV=production ENV NEXT_TELEMETRY_DISABLED=1 -# 安装 wget 用于健康检查 -RUN apk add --no-cache wget +# 安装 curl 用于健康检查 +RUN apk add --no-cache curl # 创建非 root 用户 RUN addgroup --system --gid 1001 nodejs diff --git a/frontend/admin-web/docker-compose.yml b/frontend/admin-web/docker-compose.yml index 489d44bf..f5f343de 100644 --- a/frontend/admin-web/docker-compose.yml +++ b/frontend/admin-web/docker-compose.yml @@ -12,7 +12,7 @@ services: - NODE_ENV=production - NEXT_TELEMETRY_DISABLED=1 healthcheck: - test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3000/api/health"] + test: ["CMD", "curl", "-f", "http://localhost:3000/api/health"] interval: 30s timeout: 10s retries: 3