replace pip with uv

This commit is contained in:
2026-02-19 18:31:17 +01:00
parent 683c73421f
commit 5b48167c66
4 changed files with 21 additions and 6 deletions

View File

@@ -1,8 +1,8 @@
FROM python:3.14-alpine
ENV PYTHONUNBUFFERED=1
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /usr/local/bin/
WORKDIR /code/
COPY requirements.txt .
RUN pip install --upgrade pip && \
pip install --no-cache-dir --requirement requirements.txt
COPY pyproject.toml .
RUN uv venv && uv pip install -r pyproject.toml
COPY . .
ENTRYPOINT ["./entrypoint.sh"]

View File

@@ -1,6 +1,8 @@
#!/usr/bin/env sh
set -e
. .venv/bin/activate
if [ "$DJANGO_PRODUCTION_MODE" = "true" ]; then
echo "starting production server ..."
gunicorn --bind=0.0.0.0:8000 --workers=2 gaehsnitzproject.wsgi

16
pyproject.toml Normal file
View File

@@ -0,0 +1,16 @@
[project]
name = "gaehsnitz"
version = "0.1.0"
requires-python = ">=3.14"
dependencies = [
"django==6.0.2",
"gunicorn==23.0.0",
"psycopg[binary]==3.3.3",
]
[tool.ruff]
target-version = "py314"
line-length = 120
[tool.ruff.lint]
select = ["E", "F", "W", "I"]

View File

@@ -1,3 +0,0 @@
django==6.0.2
gunicorn==23.0.0
psycopg[binary]==3.3.3