This commit is contained in:
Nyako
2026-06-12 16:46:37 +03:00
parent 1db8e46064
commit ed39d2b56a
5 changed files with 44 additions and 7 deletions
+4 -1
View File
@@ -1,4 +1,8 @@
# ---> Python # ---> Python
# DEV
install.ps1
up/
# Secure data # Secure data
.vscode .vscode
old/ old/
@@ -7,7 +11,6 @@ tmp/
config_gb.json config_gb.json
migration.py migration.py
change_log.txt change_log.txt
up/
.python-version .python-version
uv.lock uv.lock
+8
View File
@@ -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"]
+6 -3
View File
@@ -8,7 +8,7 @@
## Prerequisites ## Prerequisites
- Python 3.13.13 or higher - Python 3.13 or higher
- ffmpeg 2026-01-29 (required if you intend to store video files) - ffmpeg 2026-01-29 (required if you intend to store video files)
- git (optional) - git (optional)
@@ -36,7 +36,10 @@ Run the following command in the folder where the site will be located:
### Installing dependencies ### Installing dependencies
In the terminal, navigate to the folder where the site is located and run: 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` ### Configuring `config.json`
@@ -64,4 +67,4 @@ Config explanation:
### Launch ### Launch
Simply run: `python run.py` Simply run: `uv run run.py`
+6 -3
View File
@@ -8,7 +8,7 @@
## Требуеться заранее установить ## Требуеться заранее установить
- Python 3.13.13 и выше - Python 3.13 и выше
- ffmpeg 2026-01-29 (Если вы будете хранить видео) - ffmpeg 2026-01-29 (Если вы будете хранить видео)
- git (по желанию) - git (по желанию)
@@ -37,7 +37,10 @@
### Производим установку зависимостей ### Производим установку зависимостей
Используя CLI сделать в папке где будет размещен сайт: Используя CLI сделать в папке где будет размещен сайт:
`pip install -r requirements.txt` ```bash
pip install uv
uv sync
```
### Делаем конфигурацию файла config.json ### Делаем конфигурацию файла config.json
@@ -66,4 +69,4 @@
### Запуск ### Запуск
Просто выполните `python run.py` Просто выполните `uv run run.py`
+20
View File
@@ -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