> 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/product-docs/product-docs-en/deployment/manual-deployment.md).

# Manual deployment

{% hint style="warning" %}
Use only in cases where the installer may disrupt already running processes.
{% endhint %}

The general procedure is described below, since it is impossible to account in advance for the specifics of a particular infrastructure.

### Steps

{% stepper %}
{% step %}

### Upload the source code to the server

Transfer the project files to your server.
{% endstep %}

{% step %}

### Go to the project directory

{% code overflow="wrap" %}

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

{% endcode %}
{% endstep %}

{% step %}

### Create a .env file based on the example

{% 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 %}

### Create folders for media files and set permissions

{% 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 %}

### Start the containers

{% code overflow="wrap" %}

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

{% endcode %}
{% endstep %}

{% step %}

### Wait for the database to start

{% code overflow="wrap" %}

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

{% endcode %}
{% endstep %}

{% step %}

### Initialize the database

{% code overflow="wrap" %}

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

{% endcode %}
{% endstep %}

{% step %}

### Create an administrator

{% code overflow="wrap" %}

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

{% endcode %}
{% endstep %}

{% step %}

### Set up the button in the Telegram bot

{% 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 %}

### Check the containers

{% code overflow="wrap" %}

```bash
docker compose ps
```

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

Automatic installation allows you to quickly and easily deploy the bloggers showcase. However, if another site is already hosted on the server, automatic installation may cause a conflict. In this case, it is recommended to deploy manually.

If you need to deploy multiple language versions on one domain, manual installation becomes more complicated: you need to run each version as a separate project, use separate databases and bot tokens, and manually configure a shared Caddy. For such a scenario, it is recommended to use the automatic installer.


---

# 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/product-docs/product-docs-en/deployment/manual-deployment.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.
