From afdaa888ec6c8313000f98e405620bfcd57a4d66 Mon Sep 17 00:00:00 2001 From: Developer Date: Tue, 2 Dec 2025 09:19:35 -0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E5=B0=86=E6=89=80=E6=9C=89?= =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E7=9A=84=E5=81=A5=E5=BA=B7=E6=A3=80=E6=9F=A5?= =?UTF-8?q?=E4=BB=8E=20wget=20=E6=94=B9=E4=B8=BA=20curl?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit curl 相比 wget 的优势: - 更轻量 (二进制文件更小) - 更常用 (标准 HTTP 工具) - 语法更简洁 (curl -f vs wget -q --spider) - 退出码更可靠 (-f 参数在 HTTP 错误时返回非 0) 修改的服务: - identity-service - wallet-service - mpc-service - reward-service - leaderboard-service - reporting-service 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- backend/services/identity-service/Dockerfile | 6 +++--- backend/services/leaderboard-service/Dockerfile | 6 +++--- backend/services/mpc-service/Dockerfile | 6 +++--- backend/services/reporting-service/Dockerfile | 6 +++--- backend/services/reward-service/Dockerfile | 6 +++--- backend/services/wallet-service/Dockerfile | 6 +++--- 6 files changed, 18 insertions(+), 18 deletions(-) diff --git a/backend/services/identity-service/Dockerfile b/backend/services/identity-service/Dockerfile index 391fa06d..02c6ce26 100644 --- a/backend/services/identity-service/Dockerfile +++ b/backend/services/identity-service/Dockerfile @@ -35,10 +35,10 @@ FROM node:20-slim WORKDIR /app -# Install OpenSSL and wget for health checks +# Install OpenSSL and curl for health checks RUN apt-get update && apt-get install -y --no-install-recommends \ openssl \ - wget \ + curl \ && rm -rf /var/lib/apt/lists/* # Install production dependencies only @@ -66,7 +66,7 @@ EXPOSE 3000 # Health check HEALTHCHECK --interval=30s --timeout=3s --start-period=40s --retries=3 \ - CMD wget -q --spider http://localhost:3000/api/v1/health || exit 1 + CMD curl -f http://localhost:3000/api/v1/health || exit 1 # Start service CMD ["node", "dist/src/main.js"] diff --git a/backend/services/leaderboard-service/Dockerfile b/backend/services/leaderboard-service/Dockerfile index 38dc29c4..b1b31257 100644 --- a/backend/services/leaderboard-service/Dockerfile +++ b/backend/services/leaderboard-service/Dockerfile @@ -38,10 +38,10 @@ FROM node:20-slim AS production WORKDIR /app -# Install OpenSSL and wget for health checks +# Install OpenSSL and curl for health checks RUN apt-get update && apt-get install -y --no-install-recommends \ openssl \ - wget \ + curl \ && rm -rf /var/lib/apt/lists/* # Copy package files and install production dependencies @@ -69,7 +69,7 @@ EXPOSE 3007 # Health check HEALTHCHECK --interval=30s --timeout=3s --start-period=40s --retries=3 \ - CMD wget -q --spider http://localhost:3007/api/health || exit 1 + CMD curl -f http://localhost:3007/api/health || exit 1 # Start the application CMD ["node", "dist/src/main.js"] diff --git a/backend/services/mpc-service/Dockerfile b/backend/services/mpc-service/Dockerfile index e4217fbf..0bbdb7e3 100644 --- a/backend/services/mpc-service/Dockerfile +++ b/backend/services/mpc-service/Dockerfile @@ -38,10 +38,10 @@ FROM node:20-slim WORKDIR /app -# Install OpenSSL and wget for health checks +# Install OpenSSL and curl for health checks RUN apt-get update && apt-get install -y --no-install-recommends \ openssl \ - wget \ + curl \ && rm -rf /var/lib/apt/lists/* # Install production dependencies only @@ -70,7 +70,7 @@ EXPOSE 3006 # Health check HEALTHCHECK --interval=30s --timeout=3s --start-period=40s --retries=3 \ - CMD wget -q --spider http://localhost:3006/api/v1/health || exit 1 + CMD curl -f http://localhost:3006/api/v1/health || exit 1 # Start service CMD ["node", "dist/main.js"] diff --git a/backend/services/reporting-service/Dockerfile b/backend/services/reporting-service/Dockerfile index 5fbcffd1..85f2a021 100644 --- a/backend/services/reporting-service/Dockerfile +++ b/backend/services/reporting-service/Dockerfile @@ -40,10 +40,10 @@ FROM node:20-slim WORKDIR /app -# Install OpenSSL and wget for health checks +# Install OpenSSL and curl for health checks RUN apt-get update && apt-get install -y --no-install-recommends \ openssl \ - wget \ + curl \ && rm -rf /var/lib/apt/lists/* # Install production dependencies only @@ -71,7 +71,7 @@ EXPOSE 3008 # Health check HEALTHCHECK --interval=30s --timeout=3s --start-period=40s --retries=3 \ - CMD wget -q --spider http://localhost:3008/api/v1/health || exit 1 + CMD curl -f http://localhost:3008/api/v1/health || exit 1 # Start service CMD ["node", "dist/src/main.js"] diff --git a/backend/services/reward-service/Dockerfile b/backend/services/reward-service/Dockerfile index 9ed9412e..fa62f88b 100644 --- a/backend/services/reward-service/Dockerfile +++ b/backend/services/reward-service/Dockerfile @@ -38,10 +38,10 @@ FROM node:20-slim WORKDIR /app -# Install OpenSSL and wget for health checks +# Install OpenSSL and curl for health checks RUN apt-get update && apt-get install -y --no-install-recommends \ openssl \ - wget \ + curl \ && rm -rf /var/lib/apt/lists/* # Install production dependencies only @@ -69,7 +69,7 @@ EXPOSE 3005 # Health check HEALTHCHECK --interval=30s --timeout=3s --start-period=40s --retries=3 \ - CMD wget -q --spider http://localhost:3005/health || exit 1 + CMD curl -f http://localhost:3005/health || exit 1 # Start service CMD ["node", "dist/src/main.js"] diff --git a/backend/services/wallet-service/Dockerfile b/backend/services/wallet-service/Dockerfile index a555300e..82cda711 100644 --- a/backend/services/wallet-service/Dockerfile +++ b/backend/services/wallet-service/Dockerfile @@ -35,10 +35,10 @@ FROM node:20-slim WORKDIR /app -# Install OpenSSL and wget for health checks +# Install OpenSSL and curl for health checks RUN apt-get update && apt-get install -y --no-install-recommends \ openssl \ - wget \ + curl \ && rm -rf /var/lib/apt/lists/* # Install production dependencies only @@ -64,7 +64,7 @@ EXPOSE 3001 # Health check HEALTHCHECK --interval=30s --timeout=3s --start-period=40s --retries=3 \ - CMD wget -q --spider http://localhost:3001/api/v1/health || exit 1 + CMD curl -f http://localhost:3001/api/v1/health || exit 1 # Start service CMD ["node", "dist/main.js"]