migrate the verification server to uv

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
leanderandClaude Opus 5.5 committed 2026-10-23 22:14:55 +02:00
1 parent 51cc7e7cf8
commit 78ccec5c8d
7 files changed
+1136 -11

No files matched your search

+2
View File
@@ -0,0 +1,2 @@
.venv
__pycache__
+1
View File
@@ -0,0 +1 @@
3.14
+8 -2
View File
@@ -1,11 +1,17 @@
FROM python:3.14 FROM python:3.14
COPY --from=ghcr.io/astral-sh/uv:0.13.5 /uv /uvx /bin/
WORKDIR /app WORKDIR /app
COPY requirements.txt . ENV UV_COMPILE_BYTECODE=1 UV_NO_CACHE=1 UV_PYTHON_DOWNLOADS=never
RUN python3 -m pip install --no-cache-dir -r requirements.txt COPY pyproject.toml uv.lock ./
RUN uv sync --locked --no-dev
COPY . . COPY . .
ENV PATH="/app/.venv/bin:$PATH"
CMD [ "uvicorn", "src.server:app", "--host", "0.0.0.0", "--port", "8001" ] CMD [ "uvicorn", "src.server:app", "--host", "0.0.0.0", "--port", "8001" ]
+7 -3
View File
@@ -18,12 +18,16 @@ docker compose up
### Option 2 - Manual ### Option 2 - Manual
0. Install Python 3.12+ 0. Install [uv](https://docs.astral.sh/uv/getting-started/installation/). It installs the right Python version for you
1. Install dependencies 1. Install dependencies
``` ```
pip install -r requirements.txt -U uv sync
``` ```
2. Run - See [this guide](https://fastapi.tiangolo.com/#create-it) 2. Run
```
uv run uvicorn src.server:app --port 8001
```
+14
View File
@@ -0,0 +1,14 @@
[project]
name = "hmgrisen-verification-server"
version = "0.1.0"
description = "A simple API that receives OAuth2 callbacks, verifies them and enters successful attempts into a database"
readme = "README.md"
requires-python = ">=3.12"
dependencies = [
"aiohttp==3.14.*",
"asyncpg==0.32.*",
"fastapi==0.162.*",
"jinja2==3.1.*",
"python-dotenv==1.2.*",
"uvicorn==0.54.*",
]
-6
View File
@@ -1,6 +0,0 @@
aiohttp==3.14.*
asyncpg==0.32.*
fastapi==0.162.*
jinja2==3.1.*
python-dotenv==1.2.*
uvicorn==0.54.*
+1104
View File
File diff suppressed because it is too large. Load diff