modified: Dockerfile
This commit is contained in:
@@ -44,15 +44,20 @@ FROM node:20-alpine AS production
|
||||
WORKDIR /app
|
||||
|
||||
# Copy backend package files and install production deps
|
||||
WORKDIR /app/backend
|
||||
COPY backend/package*.json ./
|
||||
RUN npm ci --omit=dev && npm cache clean --force
|
||||
|
||||
# Copy built backend
|
||||
# Copy built backend (to /app/backend/dist)
|
||||
COPY --from=backend-builder /app/backend/dist ./dist
|
||||
|
||||
# Copy built frontend to the location expected by backend
|
||||
# Copy built frontend (to /app/frontend/dist)
|
||||
WORKDIR /app
|
||||
COPY --from=frontend-builder /app/frontend/dist ./frontend/dist
|
||||
|
||||
# Set working directory to backend
|
||||
WORKDIR /app/backend
|
||||
|
||||
# Set environment
|
||||
ENV NODE_ENV=production
|
||||
ENV PORT=3000
|
||||
|
||||
Reference in New Issue
Block a user