initial
This commit is contained in:
22
Dockerfile.builder
Normal file
22
Dockerfile.builder
Normal file
@@ -0,0 +1,22 @@
|
||||
# Stage 1: init
|
||||
FROM python:3.11 as init
|
||||
|
||||
# Pass `--build-arg API_URL=http://app.example.com:8000` during build
|
||||
ARG API_URL
|
||||
|
||||
# Copy local context to `/app` inside container (see .dockerignore)
|
||||
WORKDIR /app
|
||||
COPY requirements.txt .
|
||||
|
||||
# Create virtualenv which will be copied into final container
|
||||
ENV VIRTUAL_ENV=/app/.venv
|
||||
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
|
||||
RUN python3.11 -m venv $VIRTUAL_ENV
|
||||
|
||||
# Install app requirements and reflex inside virtualenv
|
||||
RUN pip install -r requirements.txt
|
||||
|
||||
COPY . .
|
||||
|
||||
# Deploy templates and prepare app
|
||||
RUN reflex init
|
||||
Reference in New Issue
Block a user