File size: 799 Bytes
4f45644
 
 
 
0ae0be2
 
413b320
 
 
4f45644
0ae0be2
413b320
 
4f45644
0ae0be2
413b320
 
0ae0be2
6f86be8
22d1155
0ae0be2
4f45644
 
0ae0be2
6f86be8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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"]