Spaces:
Paused
Paused
dushyantsingh0 commited on
Commit ·
f332708
1
Parent(s): 757203c
fix: include frontend in docker context
Browse files12334567567898910111213141516171112181914202122232416 unmodified lines41424337444546475 unmodified lines5354554956575859# --- STAGE 1: FRONTEND BUILD (Node.js) ---FROM node:20-slim AS frontend-builderWORKDIR /app/frontendWORKDIR /app
# Increase memory for the JS builder to prevent "exit code: 2" crashesENV NODE_OPTIONS="--max-old-space-size=4096"
# Copy frontend workspace filesCOPY frontend/package*.json ./COPY frontend/packages ./packagesCOPY frontend/apps ./appsCOPY frontend/tsconfig.json ./# Copy monorepo root configCOPY frontend/package*.json ./frontend/COPY frontend/tsconfig.json ./frontend/
# Copy all packages and appsCOPY frontend/packages ./frontend/packagesCOPY frontend/apps ./frontend/apps
WORKDIR /app/frontend
# Install and Build all workspaces# Note: We build WITHOUT an explicit VITE_API_URL so the client defaults to relative paths# Install and build sequentially (More reliable than --workspaces)RUN npm installRUN npm run build --workspacesRUN npm run build -w apps/customerRUN npm run build -w apps/internal
# --- STAGE 2: BACKEND BASE (Python) ---FROM python:3.11-slim AS base16 unmodified linesCOPY requirements.txt .RUN pip install --no-cache-dir -r requirements.txt
# --- STAGE 3: HEAVY-AI (Optional logic) ---# --- STAGE 3: HEAVY-AI ---FROM base AS heavyCOPY requirements-ai.txt .RUN pip install --no-cache-dir -r requirements-ai.txt5 unmodified lines# Copy backend application codeCOPY . .
# Copy BUILT frontend assets from Stage 1 into the backend directories# Copy BUILT frontend assets from Stage 1COPY --from=frontend-builder /app/frontend/apps/customer/dist ./frontend/apps/customer/distCOPY --from=frontend-builder /app/frontend/apps/internal/dist ./frontend/apps/internal/dist
Dockerfile+18-11