Skip to content

backup: deploy fixes (image reference + DB var scoping)

jedmund requested to merge jedmund/backup-fix-borgui-image into main

Created by: jedmund

Summary

Combined fixes for issues hit during initial deploy of the backup stack. Originally split across two PRs (#42 closed, #43 here); consolidated back onto this branch so further fixes during the same iteration cycle land on one PR.

Fix 1: borg-ui image reference

PR 3 referenced `ghcr.io/karanhudia/borg-ui:latest` based on the GitHub repo owner. The actual published image is `ainullcode/borg-ui:latest` on Docker Hub (per the project README). Wrong path produced `error from registry: denied` on the docker compose up step.

Fix 2: cross-stack DB variable resolution

PR 2's `borgmatic.yaml.j2` referenced variables like `immich_db_name` and `synapse_db_user` expecting they'd resolve from each stack's role defaults. They didn't, because role defaults only load when their own role is applied; the backup playbook only loads the backup role's defaults. Failed with `'immich_db_name' is undefined` at the borgmatic config template step.

Mirror block now lives in `roles/backup/defaults/main.yml` with a comment explaining the per-stack defaults remain the source of truth. Vault values (passwords plus a few non-secret values like `komodo_db_username`, `couchdb_user`) still resolve fine via the per-group vault.yml loading.

Verified each value against the per-stack defaults before locking in:

Stack DB name DB user
Immich `immich` `postgres`
Mastodon `mastodon_production` `mastodon`
Synapse `synapse` `synapse`
MAS `mas` `mas`
n8n `n8n` `n8n`
Miniflux `miniflux` `miniflux`
Forgejo `forgejo` `forgejo`
Blinko `blinko` `blinko`
Draftboard `draftboard` `draftboard`

Commits

  1. `backup: fix borg-ui image reference`
  2. `backup: mirror DB name/user defaults so borgmatic config can resolve them`

Test plan

  • `make deploy-backup` from main (after merge) completes through the docker compose up step
  • `cat /opt/docker/backup/config/borgmatic/config.yaml` on nuc-mini shows fully-resolved DB names and users with no `{{ }}` leftovers
  • `docker ps` shows both `borgmatic` and `borg-ui` containers running
  • `https://backup.atelier.house\` returns the borg-ui login page
  • If more deploy errors surface during testing, add fixes as commits to this same branch (don't open new PRs until this one is merged)

Merge request reports

Loading