No description
  • Jinja 66.2%
  • Just 33.8%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
egoreast a72929d9ec
All checks were successful
CI / lint (push) Successful in 1m24s
docs: move the stand to dubl.lightnode.ru
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 00:07:21 +03:00
.forgejo/workflows refactor!: rename the playbook to dubl and drop xprem, adminer and NAS backup 2026-11-04 16:50:07 +03:00
docs docs: move the stand to dubl.lightnode.ru 2026-11-05 00:07:21 +03:00
examples docs: move the stand to dubl.lightnode.ru 2026-11-05 00:07:21 +03:00
group_vars/dubl_servers refactor!: rename the playbook to dubl and drop xprem, adminer and NAS backup 2026-11-04 16:50:07 +03:00
roles/custom refactor!: rename the playbook to dubl and drop xprem, adminer and NAS backup 2026-11-04 16:50:07 +03:00
.ansible-lint refactor!: rename the playbook to dubl and drop xprem, adminer and NAS backup 2026-11-04 16:50:07 +03:00
.gitattributes chore: import from slovo-propovedi-playbook main c16b4186 2026-11-03 15:39:25 +03:00
.gitignore chore: stop tracking local agent state 2026-11-04 21:59:28 +03:00
.yamllint chore: import from slovo-propovedi-playbook main c16b4186 2026-11-03 15:39:25 +03:00
AGENTS.md refactor!: rename the playbook to dubl and drop xprem, adminer and NAS backup 2026-11-04 16:50:07 +03:00
ansible.cfg refactor!: rename the playbook to dubl and drop xprem, adminer and NAS backup 2026-11-04 16:50:07 +03:00
CLAUDE.md chore: import from slovo-propovedi-playbook main c16b4186 2026-11-03 15:39:25 +03:00
justfile refactor!: rename the playbook to dubl and drop xprem, adminer and NAS backup 2026-11-04 16:50:07 +03:00
README.md refactor!: rename the playbook to dubl and drop xprem, adminer and NAS backup 2026-11-04 16:50:07 +03:00
requirements.yml refactor!: rename the playbook to dubl and drop xprem, adminer and NAS backup 2026-11-04 16:50:07 +03:00
setup.yml refactor!: rename the playbook to dubl and drop xprem, adminer and NAS backup 2026-11-04 16:50:07 +03:00

dubl-infra

Ansible playbook for deploying the dubl infrastructure services for «Дубль» (PostgreSQL, PgBouncer, MinIO, Traefik, daily DB dumps).

This playbook follows the matrix-docker-ansible-deploy pattern: every service runs in a Docker container managed by systemd, with Traefik as the reverse proxy in front of everything.

It provisions shared infrastructure only. The applications (dubl-api, dubl-docs, the dubl-mobile web app) deploy themselves from their own repositories via scripts/vps-deploy.sh on a v* tag, and expect this playbook to have run against the host first. See Deploying the applications.

Features

  • PostgreSQL 18.4 — primary database
  • PgBouncer — connection pooling in front of PostgreSQL
  • MinIO — S3-compatible object storage (private bucket, console not exposed)
  • Traefik — reverse proxy with automatic Let's Encrypt certificates
  • systemd-managed containers — each service runs as its own systemd unit

Prerequisites

  • Ansible 2.16+ on the control machine
  • just — the command runner used by the justfile (see just). If you don't have it, you can run the raw ansible-playbook commands instead (see the note in the quick start below)
  • Docker on the target host

Quick start

  1. Clone this repository:

    git clone <your-repo-url> dubl-infra
    cd dubl-infra
    
  2. Install the Galaxy roles:

    just roles
    
  3. Create your configuration file:

    mkdir -p inventory/host_vars/<your-host>
    cp examples/vars.yml inventory/host_vars/<your-host>/vars.yml
    

    Then open inventory/host_vars/<your-host>/vars.yml and fill in your domain names and secrets.

  4. Create your inventory file:

    cp examples/hosts inventory/hosts
    

    Then edit inventory/hosts and add your server to the [dubl_servers] group.

  5. Run the playbook to set everything up and start the services:

    just setup-all
    

The first admin is created by the API on its first start (see Deploying the applications).

Note

All commands above use just (see the justfile — run just to list the available recipes). If you don't have just installed, you can run the same steps with Ansible directly:

ansible-galaxy role install -r requirements.yml -p roles/galaxy
ansible-galaxy collection install -r requirements.yml
ansible-playbook -i inventory/hosts setup.yml --tags=setup-all,start

Documentation

License

AGPL-3.0