-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdockerfile
More file actions
29 lines (22 loc) · 818 Bytes
/
dockerfile
File metadata and controls
29 lines (22 loc) · 818 Bytes
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
26
27
28
29
# 1. Use Python 3.13 as the base image
FROM python:3.13-slim
# 2. Set the working directory inside the container
WORKDIR /app
# 3. Install system dependencies for Reflex (Node.js and Unzip)
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/*
# 4. Copy and install Python dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# 5. Copy the rest of the application code
COPY . .
# 6. export the frontend at build time only
RUN reflex export --frontend-only --no-zip
# 7. Expose the port Reflex uses
EXPOSE 8000
# 8. Run backend only - Render handles one port
CMD reflex run --env prod --backend-only --backend-port ${PORT:-8000}