Spaces:
Running
Running
| # Build Stage: Build the Vite frontend | |
| FROM node:22-slim AS build | |
| WORKDIR /app | |
| COPY package*.json ./ | |
| RUN npm ci | |
| COPY . . | |
| RUN npm run build | |
| # Runtime Stage: serve the validated, versioned static artifacts | |
| FROM python:3.9-slim | |
| WORKDIR /app | |
| # Copy the built frontend from build stage | |
| COPY --from=build /app/dist ./dist | |
| # Expose port 7860 (Hugging Face default) | |
| EXPOSE 7860 | |
| CMD ["python3", "-m", "http.server", "7860", "--directory", "dist"] | |