Docker: a Stacks section — edit a compose file, validate, deploy; fix the sideways scroll on phones

Stacks are found from container labels; the file is resolved on the host or through an
orchestrator's mounts, and compose runs where the file makes sense (inside Dockhand here),
so a redeploy is identical to how the stack was deployed. Save validates with compose and
keeps a .hamlab-bak; Deploy / Update / Restart / Stop run as followed tasks.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
Mitchell-Johnson
2026-09-19 15:23:50 -07:00
co-authored by Claude Fable 5.1
parent 08fb9d6e38
commit 9c4f9dfa9f
6 changed files with 377 additions and 17 deletions
+12 -2
View File
@@ -204,8 +204,18 @@ something long in one, switch away and back, refresh — it's all still there.
sensors, start / stop / restart (asked first), logs that follow (polled with `--since`,
no held connection), inspect (env *names* only), and images / volumes / networks
tables. Works on every machine through the hub; `#/grid/docker/immich_server` links to
one. Creating, removing and pruning are deliberately absent — Dockhand stays the one
place that changes what exists.
one. **Stacks** (`internal/api/stacks.go`): every compose project, found from its
containers' labels, with its file to edit and Deploy (`up -d`), Update (pull, then
deploy), Restart and Stop as followed tasks. The file is looked for where the label says
*and through every container's mounts*, because an orchestrator that runs compose inside
its own container (Dockhand here; Dockge, Portainer) records a path in its own
filesystem; compose is then run **inside that container**, so `.env`, relative paths
and the compose labels stay exactly as deployed (verified: labels identical after a
redeploy). Save validates with `compose config` first, keeps the previous file as
`<file>.hamlab-bak`, and never deploys by itself. A stack deployed from another host
(Dockhand on `core` driving `grid` over tcp) has no file on that machine: listed
read-only, saying so — edit those from the machine that holds the file. Removing
containers, images and volumes is still absent.
- **Skins** — 13 since 2026-09-19 (`themes.ts`: a palette is one `mk(…)` line): Dark,
Light, Cyberpunk, Retro, **HUD** (hairlines of cyan on near-black, corner ticks, thin
type), Nord, Gruvbox, Catppuccin + Latte, Dracula, Tokyo Night, Solarized Dark + Light;