Browse Source

fix(infra): fix docker-build for web

pull/85/head
isra el 9 months ago
parent
commit
2b110b6fc5
  1. 5
      web/Dockerfile

5
web/Dockerfile

@ -29,8 +29,6 @@ COPY . .
# Set environment variables for building # Set environment variables for building
ENV NEXT_TELEMETRY_DISABLED 1 ENV NEXT_TELEMETRY_DISABLED 1
# Generate prisma client - make sure it exists
RUN pnpm prisma generate
# Build the application # Build the application
RUN pnpm build RUN pnpm build
@ -65,8 +63,7 @@ COPY --from=builder --chown=nextjs:nodejs /app/package.json ./
COPY --from=builder --chown=nextjs:nodejs /app/pnpm-lock.yaml ./ COPY --from=builder --chown=nextjs:nodejs /app/pnpm-lock.yaml ./
# Install only production dependencies, including Prisma, and generate Prisma client # Install only production dependencies, including Prisma, and generate Prisma client
RUN pnpm install --prod --frozen-lockfile && \
pnpm prisma generate
RUN pnpm install --prod --frozen-lockfile
# Switch to non-root user # Switch to non-root user
USER nextjs USER nextjs

Loading…
Cancel
Save