From f1400b4e59d80a50b77538b6c983268d9530a309 Mon Sep 17 00:00:00 2001 From: "T. Narantuya" Date: Fri, 29 Aug 2025 11:42:04 +0900 Subject: [PATCH] Update Dockerfile to generate Prisma client in production image for improved deployment consistency --- apps/bff/Dockerfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/bff/Dockerfile b/apps/bff/Dockerfile index 45c4062c..fa92c8e5 100644 --- a/apps/bff/Dockerfile +++ b/apps/bff/Dockerfile @@ -85,8 +85,10 @@ RUN pnpm install --frozen-lockfile --prod --ignore-scripts COPY --from=builder /app/packages/shared/dist ./packages/shared/dist COPY --from=builder /app/apps/bff/dist ./apps/bff/dist COPY --from=builder /app/apps/bff/prisma ./apps/bff/prisma -COPY --from=builder /app/apps/bff/node_modules/.prisma ./apps/bff/node_modules/.prisma -COPY --from=builder /app/apps/bff/node_modules/@prisma ./apps/bff/node_modules/@prisma + +# Generate Prisma client in the production image (ensures engines and client are present) +WORKDIR /app/apps/bff +RUN pnpm prisma generate # Create non-root user RUN addgroup --system --gid 1001 nodejs && \