Skip to content

Commit 409b396

Browse files
author
yangtao
committed
fix:build 后端的报错
1 parent b6b4fd5 commit 409b396

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Dockerfile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,8 @@ COPY --from=builder /app/dist ./dist
9494
COPY --from=builder /app/prisma ./prisma
9595
COPY --from=builder /app/scripts ./scripts
9696

97-
# 复制已生成的 Prisma 客户端
98-
COPY --from=builder /app/node_modules/.prisma ./node_modules/.prisma
99-
COPY --from=builder /app/node_modules/@prisma ./node_modules/@prisma
97+
# 生成 Prisma 客户端(生产环境)
98+
RUN pnpm exec prisma generate
10099

101100
# 创建非root用户
102101
RUN addgroup -g 1001 -S nodejs && \

0 commit comments

Comments
 (0)