infra: mirror LAN dev secrets under $HOME for snap-confined Docker #85

Merged
admin_emi merged 2 commits from fix/lan-dev-secrets-snap-confinement into dev 2026-07-25 07:16:10 +00:00

2 commits

Author SHA1 Message Date
Emi Griffith
40d3b5f5dc render-secrets.sh: fix SC2015 in the mirror-write guard
All checks were successful
PR build (required check) / changes (pull_request) Successful in 21s
secrets-guard / encrypted (pull_request) Successful in 26s
shell-lint / shellcheck (pull_request) Successful in 23s
PR build (required check) / validate-observability (pull_request) Successful in 48s
PR build (required check) / build-frontend (pull_request) Successful in 2m14s
PR build (required check) / build-backend (pull_request) Successful in 2m46s
PR build (required check) / gate (pull_request) Successful in 2s
A && B || C isn't if-then-else -- C can run when A is true but B
fails too. Use an explicit if/else so an mkdir success + install
failure is still caught.
2026-07-25 00:12:07 -07:00
Emi Griffith
73cd6b7aae infra: mirror LAN dev's rendered secrets under $HOME for snap-confined Docker
Some checks failed
PR build (required check) / changes (pull_request) Successful in 26s
secrets-guard / encrypted (pull_request) Successful in 10s
shell-lint / shellcheck (pull_request) Failing after 14s
PR build (required check) / validate-observability (pull_request) Successful in 1m5s
PR build (required check) / build-frontend (pull_request) Successful in 3m47s
PR build (required check) / build-backend (pull_request) Successful in 4m44s
PR build (required check) / gate (pull_request) Successful in 6s
Docker on the LAN box is the snap package, sandboxed to $HOME (plus a
short allowlist) -- it can't see /etc/thermograph.env at all, so
env_file: /etc/thermograph.env silently loads nothing for every
container there, no matter how correctly the vault renders. Confirmed
directly: `docker run --env-file /etc/thermograph.env` fails with
"no such file or directory" on a file the shell reads fine; the same
file under $HOME loads correctly.

render-secrets.sh gains an opt-in second write
(THERMOGRAPH_SECRETS_ENV_FILE_MIRROR), deploy-dev.sh points it at
infra/deploy/dev-secrets.env (gitignored, re-rendered every deploy),
and docker-compose.dev.yml adds it as a second env_file entry for
backend/daemon/lake -- compose appends env_file lists across overlays,
so this is additive and prod/beta (which never set the mirror var)
are unaffected.
2026-07-25 00:08:45 -07:00