Migrate project to uv and add Docker CI
All checks were successful
CI / test (push) Successful in 5m48s
CI / test (pull_request) Successful in 48s
CI / docker-build (push) Successful in 3m7s
CI / docker-build (pull_request) Successful in 45s

This commit is contained in:
steve-w
2026-04-06 16:51:36 +00:00
parent 18af835645
commit b2f7d0480a
8 changed files with 516 additions and 40 deletions

23
Dockerfile Normal file
View File

@@ -0,0 +1,23 @@
FROM python:3.12-slim AS base
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
UV_LINK_MODE=copy \
UV_COMPILE_BYTECODE=1
WORKDIR /app
RUN apt-get update \
&& apt-get install -y --no-install-recommends curl ca-certificates \
&& rm -rf /var/lib/apt/lists/*
COPY --from=ghcr.io/astral-sh/uv:0.7.22 /uv /uvx /bin/
COPY pyproject.toml uv.lock ./
RUN uv sync --frozen --no-dev
COPY main.py ./
EXPOSE 8000
CMD ["uv", "run", "--no-dev", "uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]