add docker files
This commit is contained in:
31
client/Dockerfile
Normal file
31
client/Dockerfile
Normal file
@@ -0,0 +1,31 @@
|
||||
# Dockerfile.ui
|
||||
FROM python:3.13-slim
|
||||
|
||||
ENV PYTHONDONTWRITEBYTECODE=1 \
|
||||
PYTHONUNBUFFERED=1
|
||||
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends curl \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Install all deps from unified requirements.txt
|
||||
COPY requirements.txt .
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
# Copy UI code + assets
|
||||
COPY client/ ./client/
|
||||
COPY assets/ ./assets/
|
||||
COPY uploads/ ./uploads/
|
||||
|
||||
RUN mkdir -p /app/uploads
|
||||
|
||||
ENV FLET_ENTRY=client/main.py \
|
||||
APP_PORT=5000 \
|
||||
API_BASE_URL=https://api.example.com
|
||||
|
||||
EXPOSE 5000
|
||||
|
||||
HEALTHCHECK --interval=30s --timeout=5s --retries=3 CMD curl -fsS http://localhost:5000/ || exit 1
|
||||
|
||||
CMD ["python", "client/main.py"]
|
||||
Reference in New Issue
Block a user