Skip to content

ADR 0047

github-actions[bot] edited this page Nov 22, 2026 · 1 revision

Status: accepted · Built: done · Date: 2026-11-22

The ecosystem's ADR 0006, step 2. Built: the bundle job (a tarball with infra/server and remote-deploy.sh, SHA256SUMS, a GitHub attestation, and the GitHub release made from the changelog); infra/hetzner, infra/cloudflare and cloud-init moved to kodentuzo/hetzner with their history; docs/server.md. The Deploy workflow and the Production environment stay until the owner's instance deploys from vindotski/spotcraft, then go.

Spotcraft ships a bundle per release and deploys nothing; kodentuzo/hetzner runs it

Context

Spotcraft's repository was both the product and its deployment. Its Deploy workflow read a Production environment, copied infra/server/* from whatever was checked out (not necessarily the version being deployed), and the OpenTofu roots in infra/ ran on the owner's machine with local state. Anyone else would have had to fork the whole monorepo to run it, and a fork can't pull updates cleanly. The ecosystem's ADR 0005 had already said the repository ships and never deploys.

Decision

  • Every release ships a bundle: spotcraft-X.Y.Z.tar.gz, with server/ (Compose, Caddy, Postgres and monitoring config) and remote-deploy.sh, plus SHA256SUMS and a GitHub build attestation. CI builds it from the tagged commit, once the image is published, and creates the GitHub release from the changelog.
  • Spotcraft is provider-neutral. It runs on any server that meets the server's requirements. It deploys nothing and holds no infrastructure code.
  • kodentuzo/hetzner runs it on Hetzner, and is the recommended way. It is a template repository: the hetzner/ and cloudflare/ OpenTofu roots (moved there with their history), cloud-init, a Deploy workflow that verifies and runs the bundle of a pinned version, and a Tofu workflow. Its state is encrypted in Hetzner Object Storage. A copy owns all of that code.
  • The owner's instance is vindotski/spotcraft, a copy of the template.

Consequences

  • What is deployed always matches the release: the bundle and the image share a version.
  • Updating an instance is bumping its pinned version, in its own repository.
  • Infrastructure changes are reviewed as plans on pull requests, in the instance's repository.
  • Improvements to the template reach existing copies only when their owners copy them.
  • Spotcraft's own deploy.yml and Production environment go once the owner's instance deploys from its own repository.

Clone this wiki locally