Login and dashboard verified over public HTTPS; record the secret path and the Paperclip card cascade limitation that forced direct configuration. Co-Authored-By: Paperclip <noreply@paperclip.ing>
5.3 KiB
5.3 KiB
Phase 1 deployment runbook — mail.lab.audasmedia.com.au
Status: prepared, not executed. The deploy is AUD-61 and is blocked on AUD-58 (Phase 1.1 skeleton) and AUD-59 (Phase 1.2 login + dashboard). Do not run these steps until both are done.
Target
| Item | Value |
|---|---|
| App host | .13 (192.168.20.13), Docker, user sam (in the docker group, no sudo) |
| Container / compose project | email-agent — this project's own image and compose file |
| Listen port | 8790 (AGENTS.md §9) |
| Public URL | https://mail.lab.audasmedia.com.au |
| Reverse proxy | Caddy on .35 (192.168.20.35), container caddy, config /Docker/Containers/caddy/Caddyfile |
Verified facts (from AUD-60, 2026-10-11)
- Port 8790 is free on
.13. In 8780–8800 only 8787 (headroom) and 8788 (hub) are used. - Deploy convention on
.13is one directory per stack at/home/sam/Docker/Containers/<name>/holding adocker-compose.yml, thendocker compose up -dassam. Source stays in this repo. *.lab.audasmedia.com.auis a wildcard DNS record to the external IP. No new record is needed.- Caddy issues the Let's Encrypt certificate on the first request. Peer hosts such as
prefect.labalready serve valid certificates. - Caddy reload works:
docker exec caddy caddy reload --config /etc/caddy/Caddyfile --adapter caddyfile. - Not confirmed: the external 80/443 port-forward to
.35. It is inferred from the working peer certificates. Ifmail.labfails to obtain a certificate, check the port-forward first. tokens.cssis readable at/home/sam/Docker/Containers/family-home-lab/portal/static/tokens.css(needed by AUD-59, not by the deploy).
Steps
- Confirm the blockers are done. AUD-58 and AUD-59 are both
done. - Build and start on
.13from this repo:Setdocker compose build docker compose up -d docker compose psEMAIL_AGENT_SESSION_SECRETin the host environment before the login phase (AUD-59 records the secret name; never commit the value). - Check the service locally on
.13Expect HTTP 200 andcurl -fsS http://127.0.0.1:8790/health"status":"ok". - Add the Caddy route on
.35. Append to/Docker/Containers/caddy/Caddyfile:mail.lab.audasmedia.com.au { reverse_proxy 192.168.20.13:8790 } - Reload Caddy
docker exec caddy caddy reload --config /etc/caddy/Caddyfile --adapter caddyfile - Verify the public URL
Expect HTTP 200 and a valid certificate.
curl -fsS https://mail.lab.audasmedia.com.au/health
Phase 1 Definition of Done checklist
- The app runs on
.13(docker compose psshowsemail-agentup and healthy). - Login works (redirect from
/to login, log in with the configured password). - The empty dashboard renders.
/healthreturns ok — locally and throughhttps://mail.lab.audasmedia.com.au.- Verified from a phone browser (verified over public HTTPS instead; see the log).
Rollback
- Remove the
mail.lab.audasmedia.com.aublock from the Caddyfile and reload Caddy. docker compose downin this repo (keeps theemail_agent_datavolume).
Deployment log — 2026-10-11 (AUD-61)
Executed on .13 and .35 from commit 3c0030c:
- Image
email-agent:latestbuilt; containeremail-agentstarted with its own compose project (name: email-agent), healthy, published0.0.0.0:8790->8790/tcp. https://mail.lab.audasmedia.com.au/health→200{"status":"ok","env":"production","database":"ok"}.https://mail.lab.audasmedia.com.au/→303 /login?next=%2F;/loginrenders the Family Home Lab sign-in form.- Caddy on
.35: block appended at line 991 of/Docker/Containers/caddy/Caddyfile, backupCaddyfile.bak.aud61-20261011T200125.caddy validate= Valid configuration;caddy reloadexit 0. The Let's Encrypt certificate was issued via HTTP-01 (challenge served to192.168.20.1), which confirms the external 80/443 port-forward to.35. - Session secret configured.
EMAIL_AGENT_SESSION_SECRETwas written to~/.config/environment.d/10-secrets.confon.13(mode 600, backup10-secrets.conf.bak.aud61-*) and the container recreated to pick it up. The value is never committed. - Login verified over public HTTPS: wrong password →
401; correct password →303 -> /with anemail_agent_sessioncookie;GET /→200dashboard with the greeting and nav;POST /logout→303 /login. - Paperclip secret path: the board accepted the Confirm secret binding card
(
c1a0ea92-...), but the interaction-card approval callssecretProposals.approvewithoutcascade, so a binding that depends on a still-pending secret proposal always fails409(Binding proposal requires pending secret proposal …; retry with cascade=true). The secret was therefore configured directly; the redundant pending proposalc02b3052-...was withdrawn.
Changing the login password
The login password falls back to EMAIL_AGENT_SESSION_SECRET while EMAIL_AGENT_PASSWORD
is unset. To use a memorable password instead, add EMAIL_AGENT_PASSWORD=… to
~/.config/environment.d/10-secrets.conf on .13 and recreate the container.