feat(tra-988): /srv/trakrf runtime layout — decouple demo box from the git working tree#492
Merged
Conversation
…smoke-test at /srv/trakrf/secrets/.env
|
🚀 Preview Deployment Update ✅ This PR has been successfully merged into the preview branch. The preview environment will update shortly at: https://app.preview.trakrf.id |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes TRA-988.
Why
The demo-box services bind-mount config straight out of the git working tree (
%h/platform/deploy/edge/...) and the quadlet unit symlinks point there too. On 2026-06-13 a routine branch switch removed those tracked files from disk,mosquittocouldn't restart (statfs .../mosquitto.conf: no such file or directory), and the quadlet symlinks dangled. A routine git op must never be able to pull live config out from under the running stack.What
Move the runtime copy of config + quadlets + scripts + units to
/srv/trakrf; the repo stays the source of truth andinstall.shbecomes an idempotent deploy step. Branch switches/pulls/resets on the checkout now have zero effect on the running box.deploy/edge/{mosquitto,traefik}/→config/…; secrets consolidated undersecrets/(gitignored); newscripts/+systemd/./srv/trakrf(config/…,secrets/…) instead of the working tree. Cloudflared power-loss hardening (fix(tra-898): cloudflared survives power-loss boot race #491) preserved.install.shrsyncsconfig/+quadlets/+scripts/+systemd/→/srv/trakrf, links the rootless units, enables the backup timer. Never touchessecrets/(hand-seeded once).pg_dump | gzip→/srv/trakrf/backups/(keep 14,Persistent=true) via asystemd --usertimer. DB stays on thetimescale_datanamed volume.README.md) rewritten:/srv/trakrflayout, fresh bring-up, reversible existing-box migration + rollback, backups, restore.db-init.sh/smoke-test.shread/srv/trakrf/secrets/.env.Migration
Reversible, no hardware needed — old
deploy/edgetree retained as instant rollback; services cut over one at a time with health checks (see README "Migrating an existing box"). Migration on the live box is performed separately.Out of scope (separate tickets)
Unclean-shutdown broker watchdog (home N5105, plug-pull-tested), clean-shutdown via power button, pinning off the floating
:previewtag.🤖 Generated with Claude Code