From d289e692bbca1dd4db707777ffe4e46ec74ba657 Mon Sep 17 00:00:00 2001 From: Von Random Date: Tue, 6 May 2025 14:06:01 +0300 Subject: [PATCH] try uv instead of pip for the deployment --- Dockerfile | 6 +++--- pyproject.toml | 16 ++++++++++++++++ 2 files changed, 19 insertions(+), 3 deletions(-) create mode 100644 pyproject.toml diff --git a/Dockerfile b/Dockerfile index 4aa6a75..0c44d2d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,9 @@ FROM python:alpine3.21 +COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/ WORKDIR /pgbot -COPY requirements.txt . -ENV PIP_ROOT_USER_ACTION=ignore -RUN pip install -r requirements.txt +COPY pyproject.toml . +RUN uv sync COPY . . CMD /pgbot/pgbot diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..488c8b0 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,16 @@ +[project] +name = "pgbot" +version = "0.1.0" +description = "not applicable" +readme = "README.md" +requires-python = ">=3.12" +dependencies = [ + "aiocron>=1.8", + "bs4>=0.0.2", + "fake-headers>=1", + "psycopg[binary]>=3.2", + "pytz>=2024.2", + "pyyaml>=6", + "requests>=2.32", + "telethon>=1.37", +]