migrate the verification server to uv
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
51cc7e7cf8
commit
78ccec5c8d
7 files changed
+1136
-11
No files matched your search
@@ -0,0 +1,2 @@
|
|||||||
|
.venv
|
||||||
|
__pycache__
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
3.14
|
||||||
@@ -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" ]
|
||||||
@@ -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
|
||||||
|
```
|
||||||
@@ -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.*",
|
||||||
|
]
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
aiohttp==3.14.*
|
|
||||||
asyncpg==0.32.*
|
|
||||||
fastapi==0.162.*
|
|
||||||
jinja2==3.1.*
|
|
||||||
python-dotenv==1.2.*
|
|
||||||
uvicorn==0.54.*
|
|
||||||
Generated
+1104
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user