fix(cd): restart the app containers when SOPS app secrets change #18
No reviewers
Labels
No labels
dependencies
major
security-pin
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
trails-cool/trails!18
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/cd-infra-restarts-apps"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #13.
Editing
infrastructure/secrets.app.envleft the Planner and Journal running with the old values:cd-appsnever triggers (it watches onlyapps/,packages/,pnpm-lock.yaml), andcd-infracopied the new.envto the server but recreated only the infra services. It needed a manual SSH, and nothing went red.The fix
Include
journal plannerin cd-infra's compose-up list.The issue proposed diffing the push for
secrets.app.env, but this is better and simpler:up -donly recreates a container whose resolved config differs, and that config includes env from--env-file. So:That second case is verified, not assumed: in an earlier
cd-infrarun, postgres keptUp 11 daysacross the deploy precisely because its config hash was unchanged. It also needs no event-payload shape, and behaves correctly onworkflow_dispatch, where there is no diff to take at all.Documentation that made this hard to spot
docs/deployment.mdclaimed "cd-apps redeploys the Planner with the new token" — never true. Now namescd-infraand explains whycd-appscannot trigger on a secret-only change.gh workflow runcommands (deployment.md ×2, CLAUDE.md ×1) — GitHub Actions is off, so these cannot work. Replaced with the Forgejo dispatch API plus the web-UI path.Anyone following the rotation procedure previously got stuck twice: once on the silent non-restart, once on a dead command.
Follow-up worth its own change
CLAUDE.md's Git Workflow section still documentsgh pr list/gh pr create/gh pr merge --merge --autoand the GitHub merge queue. All of that is now wrong — Forgejo has no merge queue, andmainis instead protected with required status checks and signed commits. I left it out to keep this focused, but it is actively misleading for both humans and agents, so it should not wait long.