Files
dotfiles/common/claude/memory/-home-connor/podman-compose-bind-mount-restart.md
T
2026-10-22 09:21:28 -04:00

1.9 KiB

name, description, metadata
name description metadata
podman-compose-bind-mount-restart podman-compose up -d does NOT restart a container when only a bind-mounted config file changed — use podman restart
type
project

In Connor's stack (/home/connor/compose.yml, rootful podman), podman-compose up -d <service> only recreates a container when the service definition in compose.yml changes. Editing a bind-mounted config file — e.g. config/authelia/configuration.yml, config/litellm/config.yaml, config/llama-swap/config.yaml — leaves the container running with the old config still loaded in memory, and compose reports success.

Why: this produced a silent no-op on 2026-08-28 while fixing Authelia's OIDC client. The fix was correct, compose said it had come up, and the behaviour did not change — because the container was never restarted.

How to apply: after a config-file-only edit, run sudo podman restart connor_<service>_1, then confirm it took by checking the container's StartedAt is LATER than the file's mtime:

sudo podman inspect connor_authelia_1 --format '{{.State.StartedAt}}'
stat -c %y config/authelia/configuration.yml

Don't trust the healthcheck as evidence of a restart — it can report healthy within a second or two from the pre-existing state. llama-swap is the exception: it polls its own config every 2s and reloads itself.

Related: zen-tos-hold

Single-file bind mounts also go stale when the file is replaced. ./Caddyfile is mounted as one file. Claude's Edit tool (and any atomic-save editor) writes a new inode, so the container keeps the old file: caddy reload succeeded and loaded the OLD config, and the new site gave ERR_SSL_PROTOCOL_ERROR (no matching site). Happened 2026-10-20 adding bazarr. Check with stat -c %i ~/Caddyfile vs sudo podman exec connor_caddy_1 stat -c %i /etc/caddy/Caddyfile; a podman restart re-attaches the mount. Directory mounts are not affected.