coa: Ansible role for coa.<domain> — checkout-backed server + site, Caddy, Stalwart SMTP (coa phase-2 Task 11) #3

Closed
opened 2026-08-28 21:00:33 +00:00 by ben · 1 comment
Owner

Plan

Matou/coa docs/superpowers/plans/2026-08-28-coa-phase-2.md Task 11 (full role text: defaults, tasks, Dockerfile, compose, Caddy snippet). Decision: coa ADR 0003.

Deliverable

roles/coa/ mirroring matou_forms: clone Matou/coa (coa_git_ref, default main) to /opt/coa/src as user coa (uid 1000); git identity coa-server <notify@mail.matou.nz> + credential.helper store --file /opt/coa/git-credentials (vault coa_forgejo_push_token); Docker (node:22 + git, host network, loopback 8097) with the checkout bind-mounted, entrypoint pnpm install --frozen-lockfile && build && start; env COA_PUBLIC_URL=https://coa.<domain>, COA_COMMUNITIES_DIR, COA_REPO_DIR, COA_GIT_PUSH=1, SMTP_* from the Stalwart notify account (stalwart_mesh_ip:587, servername mail.<domain>). conf.d/coa.caddy: /api/* → :8097; handle_path /c/* → communities/ with rewrite ^/<slug>/?$ → /<slug>/index.html; else site/dist SPA. playbooks/host.yml after matou_forms gated on coa_enabled; host_vars/matou.yml coa_enabled: true; CHANGELOG line.

Acceptance

  • make host LIMIT=matou --check --diff -t coa clean.
  • Role asserts the two secrets and coa_port > 1024.
  • No secret in the checkout; compose file 0600.

depends_on

  • Matou/coa #38 (push credentials — human)

out_of_scope

Running it for real (Matou/coa #39); DNS (wildcard covers coa.<domain>).

## Plan `Matou/coa` `docs/superpowers/plans/2026-08-28-coa-phase-2.md` **Task 11** (full role text: defaults, tasks, Dockerfile, compose, Caddy snippet). Decision: coa ADR 0003. ## Deliverable `roles/coa/` mirroring `matou_forms`: clone `Matou/coa` (`coa_git_ref`, default `main`) to `/opt/coa/src` as user `coa` (uid 1000); git identity `coa-server <notify@mail.matou.nz>` + `credential.helper store --file /opt/coa/git-credentials` (vault `coa_forgejo_push_token`); Docker (node:22 + git, host network, loopback `8097`) with the checkout bind-mounted, entrypoint `pnpm install --frozen-lockfile && build && start`; env `COA_PUBLIC_URL=https://coa.<domain>`, `COA_COMMUNITIES_DIR`, `COA_REPO_DIR`, `COA_GIT_PUSH=1`, `SMTP_*` from the Stalwart `notify` account (`stalwart_mesh_ip:587`, `servername mail.<domain>`). `conf.d/coa.caddy`: `/api/*` → `:8097`; `handle_path /c/*` → `communities/` with `rewrite ^/<slug>/?$ → /<slug>/index.html`; else `site/dist` SPA. `playbooks/host.yml` after `matou_forms` gated on `coa_enabled`; `host_vars/matou.yml` `coa_enabled: true`; CHANGELOG line. ## Acceptance - `make host LIMIT=matou --check --diff -t coa` clean. - Role asserts the two secrets and `coa_port > 1024`. - No secret in the checkout; compose file `0600`. ## depends_on - Matou/coa #38 (push credentials — human) ## out_of_scope Running it for real (Matou/coa #39); DNS (wildcard covers `coa.<domain>`).
Author
Owner

Credentials from coa#38 are in place. Wire the role to: vault coa_forgejo_deploy_key (ed25519 private key — NOT a token; mount as an SSH key), remote ssh://git@elitebook-distributed-server-01.netbird.selfhosted:2222/Matou/coa.git (git SSH is mesh-only on :2222), COA_GIT_PUSH=1, commit identity coa-server <notify@mail.matou.nz>, SMTP via stalwart_notify_app_password as notify@mail.matou.nz (same host/port/TLS-servername pattern as matou_forms). Proof push: Matou/coa aa754d1.

Credentials from coa#38 are in place. Wire the role to: vault `coa_forgejo_deploy_key` (ed25519 private key — NOT a token; mount as an SSH key), remote `ssh://git@elitebook-distributed-server-01.netbird.selfhosted:2222/Matou/coa.git` (git SSH is mesh-only on :2222), `COA_GIT_PUSH=1`, commit identity `coa-server <notify@mail.matou.nz>`, SMTP via `stalwart_notify_app_password` as `notify@mail.matou.nz` (same host/port/TLS-servername pattern as `matou_forms`). Proof push: Matou/coa aa754d1.
ben 2026-08-31 03:11:33 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
Matou/matou-distributed-servers#3
No description provided.