File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -21,18 +21,19 @@ COPY . .
2121# Generate Prisma client with workspace root path
2222RUN npx prisma generate --schema=backend/prisma/schema.prisma
2323
24- # Build TypeScript to JavaScript
24+ # Change to backend directory and build
25+ WORKDIR /app/backend
2526RUN npm run build
2627
2728# Stage 2: Production stage
2829FROM node:20-alpine
2930
3031WORKDIR /app
3132
32- # Copy production dependencies and built files
33- COPY --from=builder /app/package*.json ./
34- COPY --from=builder /app/dist ./dist
35- COPY --from=builder /app/node_modules ./node_modules
33+ # Copy production dependencies and built files from backend
34+ COPY --from=builder /app/backend/ package*.json ./
35+ COPY --from=builder /app/backend/ dist ./dist
36+ COPY --from=builder /app/backend/ node_modules ./node_modules
3637COPY --from=builder /app/backend/prisma ./prisma
3738COPY --from=builder /app/backend/src/generated ./src/generated
3839
You can’t perform that action at this time.
0 commit comments