fix(backup-service): 修复健康检查配置不一致问题

- 将 Dockerfile 从 wget 改为 curl
- 统一 Dockerfile 和 docker-compose.yml 健康检查工具
- 增加 start_period 从 5s 到 40s,给予服务更多启动时间

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Developer 2025-12-02 09:57:32 -08:00
parent 17ff0d951e
commit 53943636ea
1 changed files with 4 additions and 4 deletions

View File

@ -24,10 +24,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/*
# Create non-root user for security
@ -55,8 +55,8 @@ USER nestjs
EXPOSE 3002
# Health check
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
CMD wget --no-verbose --tries=1 --spider http://localhost:3002/health || exit 1
HEALTHCHECK --interval=30s --timeout=3s --start-period=40s --retries=3 \
CMD curl -f http://localhost:3002/health || exit 1
# Start the application
CMD ["node", "dist/src/main.js"]