Skip to content

feat(server,web): publish Docker images with each release - #129

Merged
sqlpxc merged 1 commit into
mainfrom
feat/docker-images
Dec 2, 2026
Merged

sqlpxc merged 1 commit into
mainfrom
feat/docker-images

Conversation

@sqlpxc

@sqlpxc sqlpxc commented Dec 2, 2026

Copy link
Copy Markdown
Owner

Publishes the relay server and web console as Docker images with every release, and makes the bundled Compose files use them.

Changes

  • .github/workflows/release.yml: a new docker job builds server/Dockerfile and web/Dockerfile on native ubuntu-24.04 / ubuntu-24.04-arm runners (no QEMU) and pushes them by digest to GHCR. Publish then merges them into multi-arch images (linux/amd64 + linux/arm64) and tags them before the GitHub Release goes public:
    • ghcr.io/<owner>/airhand-server, ghcr.io/<owner>/airhand-web
    • every release: X.Y.Z / X.Y.Z-rc.N; stable releases also move X.Y and latest
    • OCI labels + index annotations (source, description, version, revision, licence), so the packages link to this repo and show a description
    • the digest artifacts (docker-digest-*) are kept out of the release assets and SHA256SUMS.txt
    • the release notes gain a "Docker images" section
  • docker-compose.yml, web/docker-compose.yml: image: ghcr.io/sqlpxc/airhand-{server,web}:${AIRHAND_VERSION:-latest}, keeping build:. docker compose up -d pulls, and builds from source only if the pull fails; --build always builds from source. AIRHAND_VERSION in .env pins a version (added to web/.env.example; root .env ignored by git and Docker)
  • .github/scripts/set-version.mjs: also writes the tag version into web/Cargo.toml and the airhand-web entry of web/Cargo.lock (the image builds with --locked; changing only Cargo.toml fails), so the web console's menu shows the released version
  • docs/deploy.md, docs/deploy.zh-CN.md: new "Images and upgrades" section (images, tags, upgrade, pinning / rollback, building from source, docker run)

After merging

  • The GHCR packages are private after their first push: set both to Public (repo → Packages → package → Package settings → Change visibility), otherwise anonymous pulls fail and Compose falls back to building from source
  • Existing deployments switch to the published latest image on their next docker compose up -d after pulling this change (the image name changed); use --build to keep building from source

Testing

  • set-version.mjs run locally: cargo metadata --locked on web/ passes after it, and fails when only web/Cargo.toml is changed
  • The tagging script was dry-run locally for an rc and a stable version (tags and annotations as expected)
  • Not yet run in CI: the first vX.Y.Z-rc.N tag after merging exercises the new jobs

- release.yml: build the relay and web console images on native amd64/arm64
  runners, push them by digest to ghcr.io/<owner>/airhand-{server,web}, and
  tag the multi-arch images (version; stable releases also X.Y and latest)
  before publishing the GitHub Release
- docker-compose.yml, web/docker-compose.yml: use the published images
  (AIRHAND_VERSION pins a version); build from source only if the pull fails
  or with --build
- set-version.mjs: also write the release version into web/Cargo.toml and
  web/Cargo.lock, so the web console shows the tagged version
- docs/deploy: document the images, upgrades, pinning and building from source
@sqlpxc
sqlpxc merged commit ccabb57 into main Dec 2, 2026
1 check passed
@sqlpxc
sqlpxc deleted the feat/docker-images branch December 2, 2026 07:10
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