Update Dockerfile to skip lifecycle scripts during production dependency installation

This commit is contained in:
T. Narantuya 2025-08-29 10:58:01 +09:00
parent a68df81aee
commit c7ba33fcb8

View File

@ -75,9 +75,10 @@ COPY pnpm-workspace.yaml package.json pnpm-lock.yaml ./
COPY packages/shared/package.json ./packages/shared/
COPY apps/bff/package.json ./apps/bff/
# Install only production dependencies; run scripts (needed for bcrypt/prisma) but disable Husky
# Install only production dependencies; skip lifecycle scripts to avoid Husky prepare
# Prisma client and native assets are generated in the builder stage and copied below
ENV HUSKY=0
RUN pnpm install --frozen-lockfile --prod
RUN pnpm install --frozen-lockfile --prod --ignore-scripts
# Copy built applications and Prisma client
COPY --from=builder /app/packages/shared/dist ./packages/shared/dist