mirror of
https://github.com/Lyxminxx/jast-frontend.git
synced 2026-10-11 12:51:57 +02:00
Initial commit: Flet frontend with CI/CD
This commit is contained in:
commit
d51545bd86
19 files changed
+4355
No files matched your search
+34
@@ -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;"]
|
||||
Reference in new issue
Block a user