> For the complete documentation index, see [llms.txt](https://vitrina-blogerov.gitbook.io/bloggers-showcase/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://vitrina-blogerov.gitbook.io/bloggers-showcase/razvertyvanie/razvertyvanie-vruchnuyu.md).

# Развертывание вручную

{% hint style="warning" %}
Использовать только в случаях, когда установщик может нарушить работу уже запущенных процессов.
{% endhint %}

Ниже приведён общий порядок действий, так как невозможно заранее учесть особенности конкретной инфраструктуры.

### Шаги

{% stepper %}
{% step %}

### Загрузить исходный код на сервер

Доставьте файлы проекта на ваш сервер.
{% endstep %}

{% step %}

### Перейдите в папку проекта

{% code overflow="wrap" %}

```bash
cd /path/to/project
```

{% endcode %}
{% endstep %}

{% step %}

### Создайте .env по примеру

{% code overflow="wrap" %}

```bash
DOMAIN=example.com
APP_LANGUAGE=ru
PROJECT_NAME=bloggers_ru
PUBLIC_BASE_PATH=
DEBUG=False
ENABLE_DOCS=False

DB_USER=blogger_admin
DB_PASSWORD=strong_database_password
DB_NAME=bloggers_db
DATABASE_URL=postgresql+asyncpg://blogger_admin:strong_database_password@db:5432/bloggers_db

SECRET_KEY=long_random_secret_key
TELEGRAM_BOT_TOKEN=your_telegram_bot_token
BOT_PROXY=
```

{% endcode %}
{% endstep %}

{% step %}

### Создайте папки для медиафайлов и выдайте права

{% code overflow="wrap" %}

```bash
mkdir -p assets/photos assets/media assets/icons/platforms assets/icons/themes assets/icons/tags assets/icons/other
sudo chown -R 1000:1000 assets
sudo chmod -R u+rwX,go+rX assets
```

{% endcode %}
{% endstep %}

{% step %}

### Запустите контейнеры

{% code overflow="wrap" %}

```bash
docker compose up -d --build
```

{% endcode %}
{% endstep %}

{% step %}

### Дождитесь запуска базы

{% code overflow="wrap" %}

```bash
docker compose exec db pg_isready -U blogger_admin -d bloggers_db
```

{% endcode %}
{% endstep %}

{% step %}

### Инициализируйте базу

{% code overflow="wrap" %}

```bash
docker compose exec -T backend python init_db.py
```

{% endcode %}
{% endstep %}

{% step %}

### Создайте администратора

{% code overflow="wrap" %}

```bash
docker compose exec -T backend python reset_admin.py "admin_login" "admin_password"
```

{% endcode %}
{% endstep %}

{% step %}

### Настройте кнопку в Telegram боте

{% code overflow="wrap" %}

```bash
curl -X POST "https://api.telegram.org/botYOUR_BOT_TOKEN/setChatMenuButton" \
  -H "Content-Type: application/json" \
  -d '{"menu_button":{"type":"web_app","text":"Open","web_app":{"url":"https://example.com/"}}}'
```

{% endcode %}
{% endstep %}

{% step %}

### Проверьте контейнеры

{% code overflow="wrap" %}

```bash
docker compose ps
```

{% endcode %}
{% endstep %}
{% endstepper %}

Автоматическая установка позволяет быстро и просто развернуть витрину блогеров. Однако, если на сервере уже размещён другой сайт, автоматическая установка может привести к конфликту. В этом случае рекомендуется выполнить развертывание вручную.

Если необходимо развернуть несколько языковых версий на одном домене, ручная установка усложняется: нужно запускать каждую версию как отдельный проект, использовать отдельные базы и токены ботов, а также вручную настроить общий Caddy. Для такого сценария рекомендуется использовать автоматический установщик.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://vitrina-blogerov.gitbook.io/bloggers-showcase/razvertyvanie/razvertyvanie-vruchnuyu.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
