fix Dockerfile prisma client generation
This commit is contained in:
parent
199278d6f5
commit
3cf745cd14
1 changed files with 9 additions and 4 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue