add docker files

This commit is contained in:
2025-09-17 09:14:30 +03:00
parent c2613de507
commit 58e69ba69e
6 changed files with 153 additions and 0 deletions

31
client/Dockerfile Normal file
View 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"]