问题: 1. Dockerfile 使用 COPY . . 会复制 node_modules 导致构建极慢 2. CMD 路径错误:dist/src/main.js 应该是 dist/main.js 修复: - 添加 .dockerignore 排除 node_modules, dist 等 - 优化 Dockerfile 只复制必要文件 (COPY src ./src) - 修正 CMD 路径为 dist/main.js - 添加构建验证步骤 (test -f dist/main.js) - 添加非 root 用户运行 - 添加健康检查 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| api-gateway | ||
| mpc-system | ||
| services | ||