From ed39d2b56a2a4d2990cb0a418d7b2d0bb6951112 Mon Sep 17 00:00:00 2001 From: Nyako <46496367+Hell13Cat@users.noreply.github.com> Date: Fri, 12 Jun 2026 16:46:37 +0300 Subject: [PATCH] 0.2.3s --- .gitignore | 5 ++++- Dockerfile | 8 ++++++++ doc/install_en.md | 9 ++++++--- doc/install_ru.md | 9 ++++++--- docker-compose.yml | 20 ++++++++++++++++++++ 5 files changed, 44 insertions(+), 7 deletions(-) create mode 100644 Dockerfile create mode 100644 docker-compose.yml diff --git a/.gitignore b/.gitignore index 8b575fb..17c0789 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,8 @@ # ---> Python +# DEV +install.ps1 +up/ + # Secure data .vscode old/ @@ -7,7 +11,6 @@ tmp/ config_gb.json migration.py change_log.txt -up/ .python-version uv.lock diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..7bee761 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,8 @@ +FROM python:3.13-slim +WORKDIR /app +RUN pip install uv +COPY pyproject.toml uv.lock* ./ +RUN uv sync --frozen +COPY . . +ENV PYTHONUNBUFFERED=1 +CMD ["uv", "run", "python", "run.py"] \ No newline at end of file diff --git a/doc/install_en.md b/doc/install_en.md index df0bd8a..2f794d9 100644 --- a/doc/install_en.md +++ b/doc/install_en.md @@ -8,7 +8,7 @@ ## Prerequisites -- Python 3.13.13 or higher +- Python 3.13 or higher - ffmpeg 2026-01-29 (required if you intend to store video files) - git (optional) @@ -36,7 +36,10 @@ Run the following command in the folder where the site will be located: ### Installing dependencies In the terminal, navigate to the folder where the site is located and run: -`pip install -r requirements.txt` +```bash +pip install uv +uv sync +``` ### Configuring `config.json` @@ -64,4 +67,4 @@ Config explanation: ### Launch -Simply run: `python run.py` \ No newline at end of file +Simply run: `uv run run.py` \ No newline at end of file diff --git a/doc/install_ru.md b/doc/install_ru.md index ca74f81..4852d13 100644 --- a/doc/install_ru.md +++ b/doc/install_ru.md @@ -8,7 +8,7 @@ ## Требуеться заранее установить -- Python 3.13.13 и выше +- Python 3.13 и выше - ffmpeg 2026-01-29 (Если вы будете хранить видео) - git (по желанию) @@ -37,7 +37,10 @@ ### Производим установку зависимостей Используя CLI сделать в папке где будет размещен сайт: -`pip install -r requirements.txt` +```bash +pip install uv +uv sync +``` ### Делаем конфигурацию файла config.json @@ -66,4 +69,4 @@ ### Запуск -Просто выполните `python run.py` \ No newline at end of file +Просто выполните `uv run run.py` \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..dadc2c9 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,20 @@ +version: "3.9" + +services: + app: + build: . + container_name: local_booru + + ports: + - "5000:5000" + + volumes: + - .:/app + - ./data:/app/data + - ./tmp:/app/tmp + - ./config.json:/app/config.json:ro + + environment: + - PYTHONUNBUFFERED=1 + + restart: unless-stopped \ No newline at end of file