Automatic updates#
The webhook service in webhook pulls this checkout
when Tangled sends a signed push event for main. Glance watches its config and
included files, so it reloads them without a container restart.
-
Ensure
/var/lib/glanceis a Git checkout whose current branch tracks the desired Tangled remote and that UID1000can write to it. -
Add the contents of
webhook/compose.ymlto the Compose project containing Glance. -
Generate a secret with
openssl rand -hex 32and set the result asGLANCE_WEBHOOK_SECRETin the Compose environment. -
Build the updater on the host, then start it:
podman build -t localhost/glance-updater:latest /var/lib/glance/webhook podman compose up -d updater -
In Tangled, open Settings > Hooks and create an active push webhook:
- Payload URL:
https://<your-glance-domain>/hooks/glance - Secret: the same value as
GLANCE_WEBHOOK_SECRET
- Payload URL:
The Glance route can keep its Authentik middleware. The more-specific webhook route intentionally has no Authentik middleware because Tangled authenticates with its HMAC signature instead.
The updater fetches origin/main and resets the checkout to that commit. This
overwrites tracked local changes and divergent local commits, but preserves
untracked files. For a private repository, also mount read-only Git credentials
into updater; a public HTTPS remote needs no credentials.