fix(health): 修正NestJS服务健康检查URL路径 /health → /api/v1/health

NestJS服务注册了全局路由前缀 api/v1,HealthController 实际挂载在
/api/v1/health 而非 /health,导致 Docker HEALTHCHECK 返回 404。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
hailin 2026-02-20 05:50:26 -08:00
parent c5787020d2
commit e8e2d14fbc
9 changed files with 9 additions and 9 deletions

View File

@ -30,5 +30,5 @@ COPY --from=builder /app/services/admin-service/package.json ./
USER node
EXPOSE 3012
HEALTHCHECK --interval=30s --timeout=5s --start-period=15s --retries=3 \
CMD wget --no-verbose --tries=1 --spider http://localhost:3012/health || exit 1
CMD wget --no-verbose --tries=1 --spider http://localhost:3012/api/v1/health || exit 1
CMD ["dumb-init", "node", "dist/main"]

View File

@ -30,5 +30,5 @@ COPY --from=builder /app/services/ai-service/package.json ./
USER node
EXPOSE 3006
HEALTHCHECK --interval=30s --timeout=5s --start-period=15s --retries=3 \
CMD wget --no-verbose --tries=1 --spider http://localhost:3006/health || exit 1
CMD wget --no-verbose --tries=1 --spider http://localhost:3006/api/v1/health || exit 1
CMD ["dumb-init", "node", "dist/main"]

View File

@ -30,5 +30,5 @@ COPY --from=builder /app/services/auth-service/package.json ./
USER node
EXPOSE 3010
HEALTHCHECK --interval=30s --timeout=5s --start-period=15s --retries=3 \
CMD wget --no-verbose --tries=1 --spider http://localhost:3010/health || exit 1
CMD wget --no-verbose --tries=1 --spider http://localhost:3010/api/v1/health || exit 1
CMD ["dumb-init", "node", "dist/main"]

View File

@ -30,5 +30,5 @@ COPY --from=builder /app/services/clearing-service/package.json ./
USER node
EXPOSE 3004
HEALTHCHECK --interval=30s --timeout=5s --start-period=15s --retries=3 \
CMD wget --no-verbose --tries=1 --spider http://localhost:3004/health || exit 1
CMD wget --no-verbose --tries=1 --spider http://localhost:3004/api/v1/health || exit 1
CMD ["dumb-init", "node", "dist/main"]

View File

@ -30,5 +30,5 @@ COPY --from=builder /app/services/compliance-service/package.json ./
USER node
EXPOSE 3005
HEALTHCHECK --interval=30s --timeout=5s --start-period=15s --retries=3 \
CMD wget --no-verbose --tries=1 --spider http://localhost:3005/health || exit 1
CMD wget --no-verbose --tries=1 --spider http://localhost:3005/api/v1/health || exit 1
CMD ["dumb-init", "node", "dist/main"]

View File

@ -30,5 +30,5 @@ COPY --from=builder /app/services/issuer-service/package.json ./
USER node
EXPOSE 3002
HEALTHCHECK --interval=30s --timeout=5s --start-period=15s --retries=3 \
CMD wget --no-verbose --tries=1 --spider http://localhost:3002/health || exit 1
CMD wget --no-verbose --tries=1 --spider http://localhost:3002/api/v1/health || exit 1
CMD ["dumb-init", "node", "dist/main"]

View File

@ -30,5 +30,5 @@ COPY --from=builder /app/services/notification-service/package.json ./
USER node
EXPOSE 3008
HEALTHCHECK --interval=30s --timeout=5s --start-period=15s --retries=3 \
CMD wget --no-verbose --tries=1 --spider http://localhost:3008/health || exit 1
CMD wget --no-verbose --tries=1 --spider http://localhost:3008/api/v1/health || exit 1
CMD ["dumb-init", "node", "dist/main"]

View File

@ -30,5 +30,5 @@ COPY --from=builder /app/services/telemetry-service/package.json ./
USER node
EXPOSE 3011
HEALTHCHECK --interval=30s --timeout=5s --start-period=15s --retries=3 \
CMD wget --no-verbose --tries=1 --spider http://localhost:3011/health || exit 1
CMD wget --no-verbose --tries=1 --spider http://localhost:3011/api/v1/health || exit 1
CMD ["dumb-init", "node", "dist/main"]

View File

@ -30,5 +30,5 @@ COPY --from=builder /app/services/user-service/package.json ./
USER node
EXPOSE 3001
HEALTHCHECK --interval=30s --timeout=5s --start-period=15s --retries=3 \
CMD wget --no-verbose --tries=1 --spider http://localhost:3001/health || exit 1
CMD wget --no-verbose --tries=1 --spider http://localhost:3001/api/v1/health || exit 1
CMD ["dumb-init", "node", "dist/main"]