modified: Dockerfile

This commit is contained in:
2025-12-18 13:36:30 +03:00
parent 26fbcd0d78
commit a5d726cf1f

View File

@@ -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