We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a4b076b commit 2beef31Copy full SHA for 2beef31
1 file changed
backend/Dockerfile
@@ -1,4 +1,4 @@
1
-# Backend Dockerfile - Debian version
+# Backend Dockerfile - Fixed version
2
FROM node:18-slim AS builder
3
4
# Set working directory
@@ -48,9 +48,12 @@ COPY prisma ./prisma/
48
# Install only production dependencies
49
RUN npm install --only=production && npm cache clean --force
50
51
-# Generate Prisma client for production
+# Generate Prisma client
52
RUN npx prisma generate
53
54
+# ✅ FIX: Set permissions BEFORE switching user
55
+RUN chown -R nodejs:nodejs /app/node_modules/.prisma
56
+
57
# Copy built application from builder stage
58
COPY --from=builder --chown=nodejs:nodejs /app/dist ./dist
59
0 commit comments