Webhook¶
Webhook is a lightweight incoming webhook server that allows you to create HTTP endpoints (hooks) on your server, which you can use to execute configured commands.
Security Warning
The webhooks as configured in this repository are insecure. They do not currently implement signature verification (e.g., X-Hub-Signature) or authentication tokens. They should only be used in a trusted network environment or properly secured with a reverse proxy and authentication.
Installation¶
Configuration¶
Webhooks are defined in a JSON file (typically hooks.json). Each hook
specifies an ID, the command to execute, and how to handle arguments.
Example hooks.json¶
[
{
"id": "rebuild-app",
"execute-command": "/path/to/script.sh",
"command-working-directory": "/path/to/wd",
"pass-arguments-to-command": [
{ "source": "string", "name": "--option" },
{ "source": "string", "name": "value" }
]
}
]
Service Setup¶
To run webhook as a background service, create a systemd unit file.
/etc/systemd/system/webhook.service