Skip to content

Replatform Phase 7 — Hosting - #73

Merged
Th3FenrisWolf merged 3 commits into
replatform/phase-6-homefrom
replatform/phase-7-hosting
Sep 30, 2026
Merged

Th3FenrisWolf merged 3 commits into
replatform/phase-6-homefrom
replatform/phase-7-hosting

Conversation

@Th3FenrisWolf

@Th3FenrisWolf Th3FenrisWolf commented Sep 30, 2026 •

Copy link
Copy Markdown
Owner

Hosts Kitchen Command Center on a Raspberry Pi 5 behind a Cloudflare Tunnel: replatform Phase 7 (plan; spec §13).

  • The app trusts forwarded headers from the tunnel's address alone, sends HSTS, and runs in Umbraco's Production mode, with its logs on the data volume and the install off after the first boot. The Vite manifest now publishes.
  • One Dockerfile builds the app and SSR images from one front-end build, and a small image carries the backup jobs.
  • deploy/compose.yaml runs them read-only, with cloudflared as the only way in. deploy/smoke-test.sh checks the site, the trust boundary and a backup restored into fresh volumes.
  • The Pi deploys by pull every five minutes (deploy/deploy.sh), and backs up nightly to R2. The steps are in docs/hosting/runbook.md.
  • A new images job builds and smoke-tests the images on an arm64 runner, and pushes them to private GHCR packages on main. Dependabot keeps NuGet, npm, the base images and the actions current.
  • Where review found holes in the plan's text, the code departs from it (the plan's "Findings from Phase 7" lists each with its reason): the SSR install has its own Yarn cache, because two parallel cold installs corrupt a shared one; the smoke test's server-rendering check no longer passes on the empty client-side fallback, and its cleanup also runs on Ctrl-C and kill; kcc-backup refuses a database that is missing, empty, corrupt or without Umbraco's schema (backups, restores and rollbacks alike), and fails the night (deleting the upload) when tar fails; deploy.sh records the last deployed commit in refs/kcc/deployed, fails loudly while a service is stopped or unhealthy, and snapshots only while the app is running and not unhealthy; the images job moves the main tags only after every commit tag is up, never cancels a run on main, and never moves main back, and build-and-test shellchecks the deploy scripts. The runbook and the spec (§6.5, §13.2 to §13.4, §13.7, §15) describe what was built.

Test plan: the combined suite is green (unit 232, integration 260, E2E 41, Vitest 796: 769 web plus its 2 expected failures, 17 admin and 8 contributions); the images build and the smoke test passes locally. CI's images job runs once this pull request targets main.

Still to do, by the owner:

  • Task 9: Cloudflare, the bucket and GitHub.
  • Task 10: the Pi and the first boot.
  • Task 11: the gate, with the site reachable behind Access and a restore rehearsed from the bucket.
  • Task 12: close the phase.

@Th3FenrisWolf
Th3FenrisWolf added this pull request to stack #75 September 30, 2026 22:07
@Th3FenrisWolf Th3FenrisWolf changed the title replatform/phase 7 hosting Replatform Phase 7 — Hosting Sep 30, 2026
Trusts forwarded headers from the tunnel alone, runs in production mode
with the Vite manifest, and builds the images the compose stack runs.
Backs up to a bucket and restores into fresh volumes, deploys by pull
from GHCR on systemd timers, builds, smoke-tests and pushes the images
in CI, and keeps dependencies current with Dependabot.
Also protects the main tags, lints the deploy scripts, applies the final
review's fixes and records where the phase departs from its plan.
@Th3FenrisWolf
Th3FenrisWolf force-pushed the replatform/phase-7-hosting branch from 1239150 to 9f40e3b Compare September 30, 2026 22:21
@Th3FenrisWolf
Th3FenrisWolf merged commit 2687d41 into main Sep 30, 2026
2 of 4 checks passed
@Th3FenrisWolf
Th3FenrisWolf deleted the replatform/phase-7-hosting branch September 30, 2026 22:52
Th3FenrisWolf added a commit that referenced this pull request Oct 7, 2026
* feat: run the site in containers behind the tunnel

Trusts forwarded headers from the tunnel alone, runs in production mode
with the Vite manifest, and builds the images the compose stack runs.

* feat: back up, deploy and publish the images from ci

Backs up to a bucket and restores into fresh volumes, deploys by pull
from GHCR on systemd timers, builds, smoke-tests and pushes the images
in CI, and keeps dependencies current with Dependabot.

* docs: write the hosting runbook and close phase 7

Also protects the main tags, lints the deploy scripts, applies the final
review's fixes and records where the phase departs from its plan.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant