fix(deploy): 修复生产环境容器启动失败问题
ci/woodpecker/push/woodpecker Pipeline failed

问题:
1. Dockerfile.prod目录结构错误
   - standalone路径不正确
   - static文件路径错误
2. docker-compose.server.yml网络配置问题
   - external网络可能不存在
3. 健康检查命令不可用
   - alpine镜像缺少wget

修复:
1. Dockerfile.prod
   - 正确复制standalone目录内容
   - 将static文件复制到.next/static/
   - 安装curl用于健康检查
2. docker-compose.server.yml
   - 移除external网络依赖
   - 使用curl进行健康检查
3. deploy-production.sh
   - 使用curl替代wget
   - 备份包含Dockerfile.prod和docker-compose.server.yml
This commit is contained in:
张翔
2026-03-29 19:44:43 +08:00
parent afc462c46c
commit bd87cdf0e6
3 changed files with 8 additions and 13 deletions
+1 -7
View File
@@ -18,19 +18,13 @@ services:
- ./data:/app/data
- ./uploads:/app/uploads
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
start_period: 40s
networks:
- novalon-network
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
networks:
novalon-network:
external: true