Set up the webhook
Give ferryd a secret, create the service, add the webhook in GitHub, then push.
Secret. ferryd gets a webhook secret.
Give the secret to ferryd
Start ferryd with the flag --github-webhook-secret, or with the variable FERRY_GITHUB_WEBHOOK_SECRET.
ferryd --base-domain apps.example.com \
--proxy-addr 0.0.0.0:80 --https-addr 0.0.0.0:443 --acme-email you@example.com \
--dashboard-host ferry.apps.example.com \
--github-webhook-secret <the secret>ferry info then shows GitHub webhook: enabled. Without a secret, /hooks/github answers 404.
Create a service from the repository
ferry create api --repo https://github.com/you/api --branch main --followAuto-deploy is on by default. The default branch is main. For a private repository, see Private repositories.
Add the webhook in GitHub
In the repository, open Settings → Webhooks → Add webhook. Enter these values:
| Field | Value |
|---|---|
| Payload URL | https://ferry.apps.example.com/hooks/github |
| Content type | application/json (application/x-www-form-urlencoded works too) |
| Secret | the secret that you gave to ferryd |
| Events | Just the push event |
GitHub sends a ping first. Ferry answers 200 with {"ok":true}. The webhook shows a green check.
Push
Push a commit to main. Then list the deploys:
ferry deploys apiID STATUS TRIGGER COMMIT CREATED DURATION
dep-c2225fad527c4b919c1b deploying webhook fe41834 Add a comment just now 1s
dep-a53de39943a841aca2c3 live create d258434 Initial commit just now 2sThe new deploy has the trigger webhook. It builds the exact commit of the push.
The app gets the commit and the branch in the variables FERRY_GIT_COMMIT and FERRY_GIT_BRANCH.