Spaces:
Sleeping
Sleeping
| FROM python:3.11-slim | |
| WORKDIR /app | |
| # Install system dependencies + Node.js (Reflex needs it to build the frontend) | |
| RUN apt-get update && apt-get install -y curl unzip \ | |
| && curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \ | |
| && apt-get install -y nodejs \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Copy project and install Python dependencies | |
| COPY . . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Move into the Reflex project directory (where rxconfig.py lives) | |
| WORKDIR /app/ticketiq | |
| # Build the static frontend (output goes to .web/) | |
| RUN reflex export --frontend-only | |
| # Expose the port that Hugging Face expects | |
| EXPOSE 7860 | |
| # Start Reflex in production – backend on 7860, frontend served from the same port | |
| CMD ["reflex", "run", "--env", "prod", "--backend-port", "7860"] |