feat(dist): M1 Docker distribution, update checking, release tags (BUNYIP-3) #6
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/m1-distribution-BUNYIP-3"
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?
Completes the BUNYIP-3 (M1) deliverables that were unbuilt when the issue was previously marked Done. The image build/publish pipeline already existed (PR #2 / DEV-331); this fills the remaining scope.
What was missing vs. acceptance criteria
docker compose upagainst a published image and reach a working instance": only dev compose existed (build-from-source). Now there is a productioncompose.yml.GET /versionreports it.Changes
compose.yml+oci-build/Caddyfile: production reference deployment running the published images behind an edge Caddy. The edge serves the SPA at${BUNYIP_HOST}and routesmsp-api.${BUNYIP_HOST}to the API, matching the SPA's runtime backend derivation inbunyip-web/src/stores/config.rs. TLS via Let's Encrypt.GET /version(newversionmodule + route): reports running version, build revision (BUNYIP_GIT_SHAbaked into the API image), andupdate_available. PollsBUNYIP_UPDATE_CHECK_URL(Forgejoreleases/latestshape) at most hourly, cached. Empty URL disables checking. Unit tests cover semver compare + tag parsing.build.yml: multi-arch capability via theBUNYIP_BUILD_PLATFORMSCI variable (defaultlinux/amd64); also triggers onv*tags so released versions publish version-tagged images.bunyip-web/oci-build/Dockerfileis now arch-portable (TARGETARCH-driven binstall).create-release.yml(new): the workflow thejust create-releaserecipe already references. On aCargo.tomlversion bump merged to main it tagsvX.Y.Zand publishes a Forgejo release, re-triggeringbuild.yml.README.md+.env.example: full self-host and update-flow docs.Notes for review
cargo fmt/clippy/check) is the gate.Cargo.lockwas not regenerated for the new directreqwestdep (all rustls crates were already present transitively); CI's non-lockedcargorun resolves the edge.create-release.ymlis untested in CI and assumesPSA_SYSTEMS_PRIVATE_PACKAGE_PAThas repository content read/write scope (the auto-injected token cannot push a tag that re-triggers another workflow).BUNYIP_BUILD_PLATFORMSonce a native arm64 runner exists.Complete the BUNYIP-3 deliverables that were missing when the issue was marked Done. Adds a production reference deployment (compose.yml) that runs the published OCI images behind an edge Caddy. The edge serves the SPA at ${BUNYIP_HOST} and routes msp-api.${BUNYIP_HOST} to the API container, matching the SPA's runtime backend derivation in bunyip-web/src/stores/config.rs. Operators deploy with `docker compose up`; applying an update is a deliberate `docker compose pull && docker compose up` action (no auto-update). Adds operator-facing update checking: GET /version reports the running version, build revision (BUNYIP_GIT_SHA baked into the API image), and whether a newer release is published. The checker polls BUNYIP_UPDATE_CHECK_URL (Forgejo releases/latest shape) at most hourly and caches the result; unset URL disables checking. Wires multi-arch capability into build.yml via the BUNYIP_BUILD_PLATFORMS CI variable (defaults to linux/amd64 to avoid forcing emulated arm64 Rust builds on the single amd64 runner). The web Dockerfile is now arch-portable (TARGETARCH-driven cargo-binstall bootstrap). Adds the create-release.yml workflow that the justfile create-release recipe already references: on a Cargo.toml version bump merged to main it tags vX.Y.Z and publishes a Forgejo release, which re-triggers build.yml to publish version-tagged images. build.yml now also triggers on v* tags. Documents the full self-host and update flow in README. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>