Docker container for adnanh/webhook
Find a file
huskee 96c72ad8e2
All checks were successful
build-latest / build (push) Successful in 2m42s
build-tag / build (push) Successful in 2m40s
Fix hook path in entrypoint
Signed-off-by: huskee <huskee@huskee.gay>
2025-09-29 20:48:15 +00:00
.forgejo/workflows revert b72f84b52e 2025-09-29 20:28:17 +00:00
latest-rev Add workflow for building latest release 2025-09-29 21:53:59 +03:00
latest-tag Actually fix tag dockerfile 2025-09-29 22:04:12 +03:00
entrypoint.sh Fix hook path in entrypoint 2025-09-29 20:48:15 +00:00
LICENSE Add license 2025-09-29 12:58:07 +03:00
README.md [skip ci] Update README.md 2025-09-29 18:56:55 +00:00

Docker image for adnanh/webhook

Tags

git.huskee.gay/huskee/webhook:latest: based on latest git commit

There are also version tags (e.g. 2.8.2).

Setting up

Various options can be set using environment variables:

  • WEBHOOK_USE_SOCKET: Listen on unix socket instead of TCP port
  • WEBHOOK_SOCKET: Unix socket to listen to (defaults to /run/webhook.sock)
  • WEBHOOK_IP: IP address to listen to (defaults to 0.0.0.0)
  • WEBHOOK_PORT: Port to listen to (defaults to 9000)
  • WEBHOOK_SECURE: Use HTTPS (certificate and key must be mounted on /cert.pem and /key.pem respectively)
  • WEBHOOK_ALLOWED_METHODS: List of allowed HTTP methods (comma separated)
  • WEBHOOK_URL_PREFIX: URL prefix where hooks will be served (e.g. example.com/hooks)

Hooks

Hooks can be defined either in /hooks/hooks.yaml or /hooks/hooks.json. For hook syntax and examples check webhook's documentation

Scripts

This image is based on Alpine Linux 3.22 and uses bash as its shell. Any packages needed can be installed using apk.

Running

Docker compose

webhook:
  image: git.huskee.gay/huskee/webhook:latest
  restart: always
  container_name: "webhook"
  environment:
    #- WEBHOOK_USE_SOCKET: true
    #- WEBHOOK_SOCKET: "/run/webhook.sock"
    #- WEBHOOK_IP: "0.0.0.0"
    #- WEBHOOK_PORT: "9000"
    #- WEBHOOK_SECURE: true
    #- WEBHOOK_ALLOWED_METHODS: "POST,GET"
    #- WEBHOOK_URL_PREFIX: "hooks"
  ports:
    - "9000:9000"
  volumes:
    - ./hooks:/hooks
    - ./scripts:/scripts
    - ./webhook.sock:/run/webhook.sock # only use if WEBHOOK_USE_SOCKET is enabled
    - ./key.pem:/key.pem # only use if WEBHOOK_SECURE is enabled
    - ./cert.pem:/cert.pem # only use if WEBHOOK_SECURE is enabled