Update Dockerfile to generate Prisma client in production image for improved deployment consistency
This commit is contained in:
parent
5076c22bee
commit
f1400b4e59
@ -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 && \
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user