Update Dockerfile to generate Prisma client in production image for improved deployment consistency

This commit is contained in:
T. Narantuya 2025-08-29 11:42:04 +09:00
parent 5076c22bee
commit f1400b4e59

View File

@ -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 && \