No description
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-10-16 23:09:50 +02:00
src feat: ✨ add webhook (redeploy from the released image) 2026-10-16 23:05:37 +02:00
.gitignore feat: ✨ add webhook (redeploy from the released image) 2026-10-16 23:05:37 +02:00
COPYING License under LGPL-3.0-or-later 2026-10-16 23:09:50 +02:00
COPYING.LESSER License under LGPL-3.0-or-later 2026-10-16 23:09:50 +02:00
MANIFEST.in feat: ✨ add webhook (redeploy from the released image) 2026-10-16 23:05:37 +02:00
pyproject.toml License under LGPL-3.0-or-later 2026-10-16 23:09:50 +02:00
README.md feat: ✨ add webhook (redeploy from the released image) 2026-10-16 23:05:37 +02:00

splent_feature_webhook

The webhook feature of a SPLENT product line.

A SPLENT feature is a Python package that a product composes with others: its models, routes, services, templates and hooks are registered when the product starts. What this feature provides and requires is listed in the [tool.splent.contract] section of pyproject.toml, which splent feature:contract --write keeps in sync with the source.

What it does

POST /webhook/deploy with Authorization: Bearer $WEBHOOK_TOKEN redeploys the product. uvlhub pulled new code inside its running containers; a SPLENT product runs a released image (splent product:release pushes <user>/<product>:latest), so this webhook pulls that image and has Compose recreate the web container from it, from a short-lived docker:cli helper.

It needs, in production:

  • the Docker socket mounted into the web container, as uvlhub's docker-compose.prod.webhook.yml did: /var/run/docker.sock:/var/run/docker.sock. That gives the app control of the host's Docker, so only mount it where the webhook is wanted;
  • WEBHOOK_TOKEN in .env.deploy, the same secret CI sends;
  • WEBHOOK_COMPOSE_DIR, the host path of the product's docker/ directory, when product:deploy ran Compose from the CLI container (the usual case).

Use it in a product

splent feature:add splent_feature_webhook

Develop

splent feature:test splent_feature_webhook
splent feature:contract splent_feature_webhook

Release

splent feature:release splent_feature_webhook --dry-run --bump patch
splent feature:release splent_feature_webhook

The first command rehearses the release and changes nothing. The second publishes it to the git forge and to PyPI, and a PyPI version is permanent.