Self-hosted environment orchestration

Ship branches,not collisions.

qahost builds an isolated environment for a target service and its complete dependency graph—without touching the shared develop stand. Dependencies a task does not change share common instances on their default branch, so stands stay cheap.

qahost / plan
$ qahost plan app task=APP-123

resolving graph...
✓ app                 target
✓ identity            dependency
✓ notifications       dependency
✓ billing             dependency
✓ PostgreSQL / Redis / RabbitMQ / MSSQL

$ qahost stand up app-123
ready  app.app-123.environments.example.com

One task. One environment.

The whole backend, resolved from configuration.

Catalog references describe application dependencies and infrastructure allocations. qahost turns that graph into a disposable, observable environment.

01 / GRAPH

Transitive dependencies

A service URL or database reference adds the required service, owner, migration, and resource.

02 / SOURCES

Any git host, side by side

Sources are plain git: GitHub, GitLab, Bitbucket, and Gitea at once—public, token-authenticated, or over ssh. Reference a repo as github:org/app or through the default source.

03 / BRANCHES

Task-aware revisions

Matching task branches are selected across sources with deterministic fallbacks.

04 / COMMON

Common instances

A catalog service marked isolated: false runs once on its default branch for every stand that does not change it; a task branch of that dependency gets a private copy, and isolated or svc:local opts out. Common instances never share a Docker network—they are reached through traefik.

05 / DATA

Isolated allocations

Dedicated databases, roles, vhosts, Redis DBs, and buckets share a resource-efficient pool.

06 / TEMPLATES

Language-independent templates

Build from php, python, node, go, rust, or java image templates, or bring your own Dockerfile, CI image, or ready image.

07 / CONTROL

Telegram, HTTP API, CI

CI/CD of any system calls the HTTP API with a personal bearer token: POST /api/stands creates or updates, DELETE /api/stands removes. Ready manual up/down pipelines ship for GitLab CI, GitHub Actions, and Gitea Actions.

08 / PROGRESS

Live progress in the bot

The Telegram bot edits its reply in real time with deploy and removal steps, then turns that message into the result.

09 / INFRA

Infra as configuration

Pool servers (PostgreSQL, MySQL, MSSQL, Redis, RabbitMQ, S3/RustFS, Garage, SeaweedFS, MongoDB, ClickHouse, OpenSearch, Kafka, NATS, Vault/OpenBao, Keycloak, authentik, Prometheus, InfluxDB), admin UIs, and plain containers come from presets plus overrides in qahost.yaml; only traefik is built in, and one operator account is created on every managed pool server for its admin UI.

10 / TLS

Certificates kept on the host

A wildcard *.<domain> plus per-stand zone certificates, persisted under <data>/acme/<domain>.json, so recreated stands do not request them again.

11 / LIFECYCLE

TTL and garbage collection

Warnings, extensions, teardown, reconciliation, and GC keep the host clean.

12 / LIMITS

Bounded by design

systemd, user quotas, and container limits protect host capacity.

From commit to stand

A predictable deployment path.

01
Resolve
Read the catalog, follow references, pick branches from any git source, and reuse common instances where the task changes nothing.
02
Allocate
Reserve databases, users, queues, cache indexes, buckets, network, and capacity.
03
Build and prepare
Reuse CI images or build locally, run migrations, load per-table JSON seeds for new databases, and copy golden templates.
04
Publish and observe
Start Compose, route component hosts through traefik with TLS, and report progress to the owner.

Quick start

From a Docker host to the first stand.

One installer, one directory, one YAML file. Docker with the Compose plugin is the only prerequisite; everything else is configuration.

Requirements

  • Docker Engine with the Compose plugin on Linux and macOS, or Docker Desktop on Windows.
  • A domain with a wildcard DNS record *.<domain> for stand hosts. TLS certificates are issued per stand or zone and persisted on the host.
  • A Telegram bot token for the bot interface — optional to try qahost out.

Four steps

01

Run the installer

The first run scaffolds the installation directory (~/.qahost, or /opt/qahost for root) with .env, config/qahost.yaml, and config/catalog/ taken from the examples, then stops so you can fill them in.

Linux / macOS
curl -fsSL https://qahost.dev/install.sh | sh
Windows · PowerShell · Docker Desktop
irm https://qahost.dev/install.ps1 | iex
02

Fill in .env and config/qahost.yaml

.env holds secrets and host paths; qahost.yaml describes the instance itself — domain, limits, git sources, and the infrastructure pool. config/catalog/ describes your services.

~/.qahost
├── .env
└── config
    ├── qahost.yaml
    └── catalog/
03

Run it again — qahost starts

Run the same installer again. It pulls ghcr.io/qahost/qahost:latest and starts qahost together with traefik; Docker restarts them, so the stack survives reboots. Running the installer later upgrades the stack from qahost.yaml.

04

Bot, token, and CI

Send /start to your Telegram bot to create and remove stands from chat, with live progress. For CI, take a token from the bot or issue one on the host:

docker exec qahost qahost token <user>
  • CI/CD of any system calls the API with that personal token: POST /api/stands {"target","branches","update":true} brings a stand up or updates it, DELETE /api/stands?target=&branch= takes it down.
  • Ready manual up/down pipelines live in examples/ci — for GitLab CI, GitHub Actions, and Gitea Actions.

Upgrade and uninstall

Running the installer again upgrades qahost: it pulls the latest image and regenerates the control stack from qahost.yaml. Uninstalling stops and removes qahost and traefik; add --purge to delete the data as well.

Uninstall · Linux / macOS
curl -fsSL https://qahost.dev/install.sh | sh -s -- uninstall
Uninstall and delete data · Linux / macOS
curl -fsSL https://qahost.dev/install.sh | sh -s -- uninstall --purge
Uninstall · Windows
& ([scriptblock]::Create((irm https://qahost.dev/install.ps1))) uninstall
Uninstall and delete data · Windows
& ([scriptblock]::Create((irm https://qahost.dev/install.ps1))) uninstall -Purge

Architecture

Small control plane. Standard runtime.

Docker Compose, SQLite, and explicit YAML. No Kubernetes cluster required—only traefik is built in, and certificates stay on the host.

InputsTelegram
CI pipelines
HTTP API
→
qahostplan · build · allocate
deploy · TTL · GC
→
RuntimeDocker Compose
Traefik + TLS
pools & common instances

Human-readable hosts

Every task becomes its own namespace.

Short component aliases stay clear in reviews, tickets, and reports. Stand hosts are published through traefik with wildcard and per-stand TLS.

app.app-123.environments.example.com
admin.app-123.environments.example.com
search.app-123.environments.example.com
callbacks.app-123.environments.example.com

Own the environment

Give every branch a safe place to run.

Start from the example config and catalog, run the installer, and let any CI bring stands up and down over the HTTP API — with the Telegram bot or without it.

Self-hosted управление стендами

Ветки отдельно.Develop цел.

qahost разворачивает изолированное окружение для целевого сервиса и полного графа его зависимостей, не затрагивая общий стенд develop. Зависимости, которые задача не меняет, используют общие инстансы на своей ветке по умолчанию — стенды остаются дешёвыми.

qahost / plan
$ qahost plan app task=APP-123

разрешение графа...
✓ app                 цель
✓ identity            зависимость
✓ notifications       зависимость
✓ billing             зависимость
✓ PostgreSQL / Redis / RabbitMQ / MSSQL

$ qahost stand up app-123
готов  app.app-123.environments.example.com

Одна задача. Один стенд.

Весь backend из декларативного каталога.

Ссылки описывают сервисные зависимости и инфраструктурные ресурсы. qahost превращает граф в одноразовое наблюдаемое окружение.

01 / ГРАФ

Транзитивные зависимости

Ссылка автоматически добавляет нужный сервис, владельца ресурса, миграции и данные.

02 / ИСТОЧНИКИ

Любой git-хостинг рядом

Источники — обычный git: GitHub, GitLab, Bitbucket и Gitea одновременно — публичные, по токену или по ssh. Репозиторий указывается как github:org/app или через источник по умолчанию.

03 / ВЕТКИ

Ревизии одной задачи

qahost ищет ветки с тем же ключом задачи в разных источниках и применяет предсказуемые fallback-правила.

04 / ОБЩИЕ

Общие инстансы

Каталожный сервис с isolated: false работает один раз на своей ветке по умолчанию для всех стендов, которые его не меняют; ветка задачи на эту зависимость получает приватную копию, а isolated или svc:local отключает общий режим. Общие инстансы никогда не делят Docker-сеть — доступ к ним идёт через traefik.

05 / ДАННЫЕ

Изолированные ресурсы

Отдельные базы, роли, vhost, Redis DB и bucket работают поверх общего пула.

06 / ШАБЛОНЫ

Языконезависимые шаблоны

Сборка из шаблонов образов php, python, node, go, rust или java — либо из своего Dockerfile, CI-образа или готового образа.

07 / УПРАВЛЕНИЕ

Telegram, HTTP API, CI

CI/CD любой системы вызывает HTTP API с персональным bearer-токеном: POST /api/stands создаёт или обновляет стенд, DELETE /api/stands удаляет. Готовые manual-пайплайны up/down есть для GitLab CI, GitHub Actions и Gitea Actions.

08 / ПРОГРЕСС

Живой прогресс в боте

Бот в Telegram редактирует своё сообщение прямо по ходу шагов развёртывания и удаления, а затем превращает его в результат.

09 / ИНФРА

Инфраструктура как конфигурация

Серверы пула (PostgreSQL, MySQL, MSSQL, Redis, RabbitMQ, S3/RustFS, Garage, SeaweedFS, MongoDB, ClickHouse, OpenSearch, Kafka, NATS, Vault/OpenBao, Keycloak, authentik, Prometheus, InfluxDB), админ-UI и обычные контейнеры описываются пресетами и override-ами в qahost.yaml; из кода встроен только traefik, а на каждом управляемом сервере пула создаётся один аккаунт оператора для его админ-UI.

10 / TLS

Сертификаты хранятся на хосте

Wildcard *.<domain> и сертификаты зон отдельных стендов сохраняются в <data>/acme/<domain>.json, поэтому пересозданные стенды не запрашивают их заново.

11 / TTL

Удаление и GC

Предупреждения, продление, teardown, reconcile и GC поддерживают порядок.

12 / ЛИМИТЫ

Защита хоста

systemd, пользовательские квоты и лимиты контейнеров защищают сервер.

От коммита до стенда

Предсказуемый путь развёртывания.

01
Разрешить граф
Прочитать каталог, пройти по ссылкам, выбрать ветки в любом git-источнике и переиспользовать общие инстансы там, где задача ничего не меняет.
02
Выделить ресурсы
Зарезервировать базы, роли, очереди, Redis DB, bucket, сеть и квоту.
03
Подготовить
Использовать CI-образы или собрать локально, выполнить миграции, загрузить JSON-сиды по таблицам в новые базы и сохранить золотые шаблоны.
04
Опубликовать
Запустить Compose, настроить Traefik с TLS и отдать владельцу ссылки, логи и доступы.

Быстрый старт

От Docker-хоста до первого стенда.

Один установщик, один каталог, один YAML-файл. Единственное требование — Docker с плагином Compose; всё остальное — конфигурация.

Требования

  • Docker Engine с плагином Compose на Linux и macOS либо Docker Desktop на Windows.
  • Домен с wildcard-DNS-записью *.<domain> для хостов стендов. TLS-сертификаты выпускаются на стенд или зону и сохраняются на хосте.
  • Токен Telegram-бота для интерфейса в чате — необязателен для первого запуска.

Четыре шага

01

Запустить установщик

Первый запуск создаёт каталог установки (~/.qahost, а для root — /opt/qahost) с .env, config/qahost.yaml и config/catalog/ из примеров, а затем останавливается, чтобы вы их заполнили.

Linux / macOS
curl -fsSL https://qahost.dev/install.sh | sh
Windows · PowerShell · Docker Desktop
irm https://qahost.dev/install.ps1 | iex
02

Заполнить .env и config/qahost.yaml

В .env лежат секреты и пути на хосте; qahost.yaml описывает сам инстанс — домен, лимиты, git-источники и пул инфраструктуры. config/catalog/ описывает ваши сервисы.

~/.qahost
├── .env
└── config
    ├── qahost.yaml
    └── catalog/
03

Запустить снова — qahost стартует

Выполните тот же установщик ещё раз: он скачает ghcr.io/qahost/qahost:latest и запустит qahost вместе с traefik; Docker перезапускает их, поэтому стек переживает перезагрузку. Повторный запуск позже обновляет стек по qahost.yaml.

04

Бот, токен и CI

Отправьте /start своему Telegram-боту, чтобы создавать и удалять стенды прямо из чата — с живым прогрессом. Для CI возьмите токен в боте или выпустите его на хосте:

docker exec qahost qahost token <user>
  • CI/CD любой системы обращается к API с этим персональным токеном: POST /api/stands {"target","branches","update":true} поднимает или обновляет стенд, DELETE /api/stands?target=&branch= удаляет его.
  • Готовые manual-пайплайны up/down лежат в examples/ci — для GitLab CI, GitHub Actions и Gitea Actions.

Обновление и удаление

Повторный запуск установщика обновляет qahost: он скачивает свежий образ и пересобирает управляющий стек по qahost.yaml. Удаление останавливает и убирает qahost и traefik; флаг --purge удаляет ещё и данные.

Удаление · Linux / macOS
curl -fsSL https://qahost.dev/install.sh | sh -s -- uninstall
Удаление вместе с данными · Linux / macOS
curl -fsSL https://qahost.dev/install.sh | sh -s -- uninstall --purge
Удаление · Windows
& ([scriptblock]::Create((irm https://qahost.dev/install.ps1))) uninstall
Удаление вместе с данными · Windows
& ([scriptblock]::Create((irm https://qahost.dev/install.ps1))) uninstall -Purge

Архитектура

Маленький control plane. Стандартный runtime.

Docker Compose, SQLite и явный YAML. Кластер Kubernetes не требуется — из кода встроен только traefik, а сертификаты живут на хосте.

ВходыTelegram
CI-пайплайны
HTTP API
→
qahostplan · build · allocate
deploy · TTL · GC
→
RuntimeDocker Compose
Traefik + TLS
пулы и общие инстансы

Понятные адреса

Каждая задача получает своё пространство имён.

Короткие имена удобно отправлять в review, задачи и отчёты. Хосты стендов публикуются через traefik с wildcard- и по-стендовыми TLS-сертификатами.

app.app-123.environments.example.com
admin.app-123.environments.example.com
search.app-123.environments.example.com
callbacks.app-123.environments.example.com

Своя инфраструктура

Дайте каждой ветке безопасное место для запуска.

Начните с примера конфига и каталога, запустите установщик — и любой CI сможет поднимать и убирать стенды через HTTP API, с Telegram-ботом или без него.