Spaces:
Configuration error
Configuration error
| # ----- Stage 1: React Frontend Build ----- | |
| FROM node:18 AS frontend-build | |
| WORKDIR /app/frontend | |
| COPY malware-detection-frontend/package*.json ./ | |
| RUN npm install | |
| COPY malware-detection-frontend/ ./ | |
| # React build karein (static files 'build' folder mein aayengi) | |
| RUN npm run build | |
| # ----- Stage 2: Python Backend ----- | |
| FROM python:3.10-slim | |
| WORKDIR /app/backend | |
| # Build folder ko frontend se copy karein | |
| COPY --from=frontend-build /app/frontend/build /app/backend/frontend_build | |
| # Backend dependencies install karein | |
| COPY BACKEND/requirements.txt ./ | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Poora backend code copy karein | |
| COPY BACKEND/ ./ | |
| # CRITICAL: Hugging Face Space sirf port 7860 expose karta hai | |
| EXPOSE 7860 | |
| # FastAPI chalayein (port 7860 par) | |
| CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"] |