# Build Stage for Frontend FROM node:18-alpine as frontend-build WORKDIR /app/frontend COPY frontend/package*.json ./ RUN npm ci COPY frontend/ ./ RUN npm run build # Runtime Stage for Backend FROM mcr.microsoft.com/playwright/python:v1.49.1-jammy WORKDIR /app # Install Python dependencies COPY backend/requirements.txt backend/ RUN pip install --no-cache-dir -r backend/requirements.txt # Copy Backend Code COPY backend/ backend/ # Copy Built Frontend Assets COPY --from=frontend-build /app/frontend/dist /app/frontend/dist # Expose Port EXPOSE 8002 # Run Application CMD ["python", "backend/main.py"]