This runner works with or without turnstile.
It only needs a user-level supervisor that runs the service as the same user as the rootless Podman containers.
Create a user runit service, for example:
mkdir -p ~/.config/service/podman-healthcheckd
cp -a /usr/share/examples/podman-healthcheckd/runit/user/. ~/.config/service/podman-healthcheckd/To capture service stdout/stderr with runit's svlogd, also install the optional log service:
mkdir -p ~/.config/service/podman-healthcheckd/log/main
cp /usr/share/examples/podman-healthcheckd/runit/user/log/run ~/.config/service/podman-healthcheckd/log/run
chmod +x ~/.config/service/podman-healthcheckd/log/runIf your user supervisor does not provide XDG_RUNTIME_DIR, set it in conf:
XDG_RUNTIME_DIR=/run/user/$(id -u)This is commonly needed when a root-owned service starts the per-user runsvdir, because variables assigned in the service conf must be exported before rootless Podman can use them. The example run script exports values loaded from conf.
Then make sure a runsvdir is supervising ~/.config/service.
If turnstile is used, the example run script uses TURNSTILE_ENV_DIR via chpst -e.
This imports the environment maintained by turnstile for user services, usually XDG_RUNTIME_DIR, DBUS_SESSION_BUS_ADDRESS, and any custom values added with turnstile-update-runit-env.
In label mode, add this label to services whose healthchecks should be scheduled:
labels:
podman-healthcheckd.enable: "true"To probe all running containers that define healthchecks, use the default:
PODMAN_HC_MODE=allThe daemon handles sv restart podman-healthcheckd cleanly. When upgrading from a version with the old signal trap, use sv force-restart podman-healthcheckd once if the old process does not stop during a normal restart.