feature: now using uv + moved to asyncpg from psycopg2

This commit is contained in:
2026-07-10 15:03:42 +03:00
parent ccec4cdf27
commit 2e5e0ed8ca
32 changed files with 1702 additions and 964 deletions
+19 -5
View File
@@ -1,9 +1,23 @@
FROM python:3.13-slim
FROM python:3.13-slim AS base
ENV UV_LINK_MODE=copy \
UV_COMPILE_BYTECODE=1 \
UV_PYTHON_DOWNLOADS=never \
PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1 \
PYTHONPATH=/app/src
COPY --from=ghcr.io/astral-sh/uv:0.11.23 /uv /uvx /usr/local/bin/
WORKDIR /app
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt
COPY pyproject.toml uv.lock ./
RUN --mount=type=cache,target=/root/.cache/uv \
uv sync --frozen --no-install-project --no-dev
COPY . .
CMD ["python", "src/__main__.py"]
COPY src src
RUN --mount=type=cache,target=/root/.cache/uv \
uv sync --frozen --no-dev
CMD ["uv", "run", "python", "src/__main__.py"]