fix(pods): bind-mount host public_html into the pod so ~/public_html is served

A member's pod home (/home/dev) is a named container volume, but Caddy serves
<name>.<host> from the host path <data>/users/<name>/public_html. The two were
disconnected, so editing ~/public_html/index.html in the pod never changed the
served page — contradicting the on-screen "edit ~/public_html to make it yours"
instruction.

Bind-mount <data>/users/<user>/public_html at /home/dev/public_html when pods
start. The host tree is created if absent so the mount source exists, and under
the docker fallback (uid 1000) the one-shot init container now also chowns the
bind path; rootless podman maps container root to the host service user that
already owns the tree, so no chown is needed there.

Detect now takes the host users dir; pass "" to disable the bind.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Anthony Ettinger 2026-06-15 13:42:08 +00:00
parent 243ef58e59
commit 06bc5631d8
3 changed files with 129 additions and 22 deletions

View file

@ -189,7 +189,7 @@ func main() {
}()
}
if m, err := pods.Detect(); err == nil {
if m, err := pods.Detect(filepath.Join(dataDir, "users")); err == nil {
a.pods = m
log.Info("pods enabled", "engine", m.Engine())
} else {