feat: migrate to uv package manager

- Add pyproject.toml with project configuration
- Update requirements.txt and requirements.dev.txt with versions
- Add .uv configuration file
- Update .gitignore for uv
- Update README with uv instructions
- Configure hatchling build system
- Add mypy configuration
- Test uv sync and pytest integration
This commit is contained in:
2025-08-12 13:12:39 +03:00
parent 333dc19020
commit 663942c41e
7 changed files with 2168 additions and 183 deletions

View File

@@ -1,22 +1,31 @@
FROM python:slim
FROM ghcr.io/astral-sh/uv:python3.13-bookworm-slim
RUN apt-get update && apt-get install -y \
postgresql-client \
git \
curl \
build-essential \
gnupg \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
# Install only transitive deps first (cache-friendly layer)
COPY pyproject.toml .
COPY uv.lock .
RUN uv sync --no-install-project
# Add project sources and finalize env
COPY . .
RUN uv sync --no-editable
# Установка Node.js LTS и npm
RUN curl -fsSL https://deb.nodesource.com/setup_lts.x | bash - && \
apt-get install -y nsolid \
&& rm -rf /var/lib/apt/lists/*
RUN npm upgrade -g npm
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm ci
COPY . .