Initial commit: Flet frontend with CI/CD

This commit is contained in:
Lyxminxx committed 2026-09-21 20:43:41 +02:00
commit d51545bd86
19 files changed
+4355

No files matched your search

+34
View File
@@ -0,0 +1,34 @@
FROM python:3.12-slim AS builder
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
WORKDIR /app
RUN apt-get update && apt-get install -y --no-install-recommends \
git \
curl \
unzip \
&& rm -rf /var/lib/apt/lists/*
COPY pyproject.toml uv.lock* ./
RUN uv sync --frozen || uv sync
COPY . .
RUN uv run flet build web
FROM nginx:alpine
COPY --from=builder /app/build/web /usr/share/nginx/html
RUN echo 'server { \
listen 8000; \
location / { \
root /usr/share/nginx/html; \
try_files $uri $uri/ /index.html; \
} \
}' > /etc/nginx/conf.d/default.conf
EXPOSE 8000
CMD ["nginx", "-g", "daemon off;"]