pr3/web-dashboard #3

Merged
thatjames merged 2 commits from pr3/web-dashboard into main 2026-04-26 17:45:33 +02:00
Owner
No description provided.
Add read-only web dashboard and DockerService state snapshot
All checks were successful
deploy / deploy (push) Successful in 38s
ef5a374bb1
Original feature ask: a web view of every managed (provider, FQDN)
pair, the containers attached to it, and the last sync status.

DockerService now keeps the worker state on the struct as a
RWMutex-guarded map[stateKey]*ManagedDomain, populated by recordSuccess
/ recordFailure / updateContainers / reapStateNotIn helpers off the
worker tick. Snapshot() returns a defensive, FQDN-sorted copy that the
HTTP handler reads once per HTMX poll.

internal/web is a thin server-rendered package: html/template embedded
via //go:embed, two routes (GET / for the page, GET /domains for the
HTMX fragment), tight CSP, no JSON, no auth, no writes. HTMX from
unpkg.com pinned by the CSP — vendoring is tracked as a follow-up.

main.go grows a graceful-shutdown shape: worker and server in separate
goroutines, signal triggers srv.Shutdown with a 5s timeout. WEB_ADDR
defaults to :8080; setting it to the empty string disables the
dashboard for headless deployments.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Drop dead time guard in state_test.go
All checks were successful
deploy / deploy (push) Successful in 18s
3f52438713
Architect review noted the trailing var _ = time.Time{} as cruft;
removing the import along with it.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
thatjames/docker-dns-resolver!3
No description provided.