fix Dockerfile prisma client generation
Some checks failed
Build and Deploy Backend / Build Backend Docker Image (push) Failing after 1m4s
Build and Deploy Backend / Deploy Backend to Server (push) Has been skipped

This commit is contained in:
JakkrapartXD 2026-02-10 09:33:40 +07:00
parent 199278d6f5
commit 3cf745cd14

View file

@ -31,13 +31,18 @@ RUN npm install -g pnpm
COPY package*.json ./
COPY pnpm-lock.yaml* ./
# Install production dependencies only
RUN pnpm install --prod --frozen-lockfile
# Install production dependencies and prisma for generate
RUN pnpm install --frozen-lockfile
# Copy prisma schema and generate client
COPY --from=builder /app/prisma ./prisma
RUN pnpm prisma:generate
# Remove devDependencies
RUN pnpm prune --prod
# Copy built files from builder
COPY --from=builder /app/dist ./dist
COPY --from=builder /app/node_modules/.prisma ./node_modules/.prisma
COPY --from=builder /app/prisma ./prisma
COPY --from=builder /app/public ./public
# Set environment