0011. Releases promote prod; phone.pixelbar.nl is bound like spacestate's domains
- Status: accepted
- Date: 2026-11-18
- Issue: #20
Context
dev is rolled by hand (just deploy dev, Deploy dev). prod answers the real doorbell, so a change must reach it only when a person decides, and only a version that passed just check. Pixel solved this in its ADR 0013; spacestate binds its custom domains with a managed certificate. ADR 0003 already says prod uses phone.pixelbar.nl and that deploys swap the image without Terraform.
Decision
infra/envs/prodis the same module as dev, inpixel-phone-prod, with Key Vault purge protection on and the real ringing helper (input_boolean.pixel_phone_ringing). Pixel prod's identity readsphone-events. A maintainer applies it from a laptop (PIXEL_PHONE_APPLY_PROD=1 just tf-apply prod); nothing applies from CI. Terraform seeds the app with:mainand ignores the image afterwards.- Merges to
maindon't touch prod. CD only publishes:<sha>and:main. - A person cuts a release: the Release workflow (
workflow_dispatchonmain, orjust release) runsjust check, thenjust bump --commit, pushes theRelease vX.Y.Zcommit and tag, opens a GitHub Release, rebuilds the image from that commit as:<sha>,:vX.Y.Zand:main, makes the Sentry release (environmentprod) and publishes the docs site. Itsprod-cdjob runs in GitHub Environmentprod(required reviewer,mainonly) and rollspixel-phone-prodto:<sha>withaz containerapp update, then waits for/versionto report that SHA. - Rollback swaps the image back:
just rollback prod <sha or vX.Y.Z>. Every released image stays on GHCR. phone.pixelbar.nlgets a free managed certificate validated by CNAME, bound in three steps in one apply (attach the hostname, issue the certificate, bind it) throughhostname.sh, copied from spacestate. DNS is outside Azure, so the CNAME andasuidTXT records are made by hand first.- CI doesn't plan prod. Environment
proddeploys frommainonly and needs an approval, so a pull request can't use its identity. CI still validates the prod stack; a maintainer runsjust tf-plan prod.
Consequences
- Unreleased changelog entries collect on
mainuntil someone runs Release. - A release replaces prod's only replica, so a call during the roll can be missed (ADR 0003). Release outside opening hours.
- Applying a stack with a custom domain needs the az CLI on the laptop (
hostname.sh). - If the job fails after the tag exists, Re-run failed jobs carries on with the same version.