fix(mining-service): 修复Docker构建问题

- tsconfig.json 添加 include/exclude 排除 prisma 文件夹
- 添加 .dockerignore 排除 seed.ts
- Dockerfile 添加构建验证

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
hailin 2026-01-14 03:34:04 -08:00
parent 3b61f2e095
commit f4380604d9
3 changed files with 12 additions and 2 deletions

View File

@ -0,0 +1,8 @@
node_modules
dist
.git
.gitignore
*.md
*.log
.env*
prisma/seed.ts

View File

@ -14,7 +14,7 @@ RUN npm ci
RUN DATABASE_URL="postgresql://user:pass@localhost:5432/db" npx prisma generate
COPY src ./src
RUN npm run build
RUN npm run build && ls -la dist/ && test -f dist/main.js
# 阶段2: 生产运行
FROM node:20-alpine AS runner

View File

@ -20,5 +20,7 @@
"paths": {
"@/*": ["src/*"]
}
}
},
"include": ["src/**/*"],
"exclude": ["node_modules", "dist", "prisma"]
}