Spaces:
Runtime error
Runtime error
Commit ·
413b320
1
Parent(s): 4f45644
file structure updated
Browse files- Dockerfile +15 -6
- ticketiq/rxconfig.py +5 -7
Dockerfile
CHANGED
|
@@ -2,14 +2,23 @@ FROM python:3.11-slim
|
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
|
| 5 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
|
| 7 |
-
|
| 8 |
-
|
| 9 |
|
| 10 |
-
#
|
| 11 |
-
RUN
|
| 12 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
EXPOSE 7860
|
| 14 |
|
| 15 |
-
|
|
|
|
|
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
|
| 5 |
+
# Install Node.js (required by Reflex)
|
| 6 |
+
RUN apt-get update && apt-get install -y curl \
|
| 7 |
+
&& curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
|
| 8 |
+
&& apt-get install -y nodejs \
|
| 9 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 10 |
|
| 11 |
+
# Copy the whole repository
|
| 12 |
+
COPY . .
|
| 13 |
|
| 14 |
+
# Install Python dependencies from root requirements.txt (reflex + httpx)
|
| 15 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
| 16 |
|
| 17 |
+
# Switch to the Reflex project directory (where rxconfig.py lives)
|
| 18 |
+
WORKDIR /app/ticketiq
|
| 19 |
+
|
| 20 |
+
# Expose the port that Hugging Face expects
|
| 21 |
EXPOSE 7860
|
| 22 |
|
| 23 |
+
# Start Reflex – it will automatically build the frontend and serve on port 7860
|
| 24 |
+
CMD reflex run --env prod --backend-port 7860
|
ticketiq/rxconfig.py
CHANGED
|
@@ -1,11 +1,9 @@
|
|
| 1 |
import reflex as rx
|
| 2 |
|
| 3 |
config = rx.Config(
|
| 4 |
-
app_name="ticketiq",
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
backend_port = 8000,
|
| 10 |
-
api_url="https://paudelapil-tech-triage.hf.space/api/v1",
|
| 11 |
)
|
|
|
|
| 1 |
import reflex as rx
|
| 2 |
|
| 3 |
config = rx.Config(
|
| 4 |
+
app_name="ticketiq",
|
| 5 |
+
frontend_port=3000,
|
| 6 |
+
backend_port=7860,
|
| 7 |
+
api_url="http://localhost:7860",
|
| 8 |
+
frontend_path="",
|
|
|
|
|
|
|
| 9 |
)
|