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:
parent
3b61f2e095
commit
f4380604d9
|
|
@ -0,0 +1,8 @@
|
||||||
|
node_modules
|
||||||
|
dist
|
||||||
|
.git
|
||||||
|
.gitignore
|
||||||
|
*.md
|
||||||
|
*.log
|
||||||
|
.env*
|
||||||
|
prisma/seed.ts
|
||||||
|
|
@ -14,7 +14,7 @@ RUN npm ci
|
||||||
RUN DATABASE_URL="postgresql://user:pass@localhost:5432/db" npx prisma generate
|
RUN DATABASE_URL="postgresql://user:pass@localhost:5432/db" npx prisma generate
|
||||||
|
|
||||||
COPY src ./src
|
COPY src ./src
|
||||||
RUN npm run build
|
RUN npm run build && ls -la dist/ && test -f dist/main.js
|
||||||
|
|
||||||
# 阶段2: 生产运行
|
# 阶段2: 生产运行
|
||||||
FROM node:20-alpine AS runner
|
FROM node:20-alpine AS runner
|
||||||
|
|
|
||||||
|
|
@ -20,5 +20,7 @@
|
||||||
"paths": {
|
"paths": {
|
||||||
"@/*": ["src/*"]
|
"@/*": ["src/*"]
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"include": ["src/**/*"],
|
||||||
|
"exclude": ["node_modules", "dist", "prisma"]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue