Features: GHCR publish, active update check, live dashboard updates#3
Merged
Merged
Conversation
Three requested features for a complete, shippable build: - Publish image to GHCR: .github/workflows/release.yml builds a multi-arch (amd64+arm64) image on pushes to main (edge) and version tags (semver + latest). README documents running the prebuilt image instead of building. - Active "Check now": registry.js resolves the current manifest digest for a tag without pulling (anonymous Docker Hub/GHCR/quay/lscr token flow); checker.js reconciles every running image against the registry and records or clears events; POST /api/check exposes it; a Check button drives it from the dashboard. Makes the app work without (or alongside) Diun and recovers from missed webhooks. - Live dashboard updates: a global SSE channel (GET /api/events) broadcasts containers-changed on webhook receipt, manual check, and finished update; the dashboard subscribes and auto-refreshes (debounced). Also fixes a latent build bug: better-sqlite3 has no musl prebuilt, so the Dockerfile now compiles it in a dedicated server-deps stage (python3/make/g++) and copies node_modules into a clean runtime image; the client stage pins --platform=$BUILDPLATFORM so it isn't rebuilt under emulation. New pure-logic tests: parseRef (6) and parseWwwAuthenticate (2) — 60 total passing. API_CONTRACT and README updated. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013Lj6nYJQDtLaZFvvEQJGM4
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.
Implements the three features picked from the roadmap, plus a latent-build-bug fix found during review. Branched off
main.Features
1. Publish image to GHCR —
.github/workflows/release.ymlbuilds a multi-arch (amd64+arm64) image and pushes toghcr.io/strandedturtle/diupdateron pushes tomain(edge) and onv*tags (semver +latest). README now documents running the prebuilt image instead of building.2. Active "Check now" —
registry.jsresolves a tag's current manifest digest without pulling (standard anonymous Docker Hub / GHCR / quay / lscr token flow);checker.jsreconciles each running image against the registry, recording or clearing events;POST /api/checkexposes it and a Check button drives it from the dashboard. This makes the app usable without Diun and lets it recover from a missed webhook. Private (auth-required) registries are skipped for now.3. Live dashboard updates — a global SSE channel (
GET /api/events) broadcastscontainers-changedon webhook receipt, manual check, and finished update; the dashboard subscribes and auto-refreshes (debounced), so badges appear without hitting Refresh.Build fix (found in review)
better-sqlite3has no musl/Alpine prebuilt binary, sonpm cimust compile it — which needs a toolchain the image didn't install. (The Alpine build was never actually run before — no daemon in CI.) The Dockerfile now compiles it in a dedicatedserver-depsstage (python3/make/g++) and copiesnode_modulesinto a clean runtime image; the client stage is pinned to--platform=$BUILDPLATFORMso it isn't rebuilt under emulation.Verified
node --test: 60/60 (8 new:parseRef×6,parseWwwAuthenticate×2).vite buildclean./api/check&/api/eventsreturn401without a cookie,503with a cookie (no daemon); opening/api/eventsthen POSTing a webhook delivered{"type":"containers-changed"}on the stream — live updates confirmed end-to-end.The multi-arch Docker build itself will be exercised for the first time by the GHCR workflow on merge to
main(no daemon available in this env).🤖 Generated with Claude Code
Generated by Claude Code