Hooks is a web service to inspect HTTP requests and debug webhooks using a simple web interface.
Data stored in boltdb (embedded key/value database) files under BOLT_PATH
.
The UI was originally created by Jeff Lindsay and his RequestBin service.
docker run -d --rm --name hooks -p "8080:8080" dotzero/hooks
Create a docker-compose.yml
file:
version: "3"
services:
hooks:
image: ghcr.io/dotzero/hooks:latest
container_name: hooks
restart: always
logging:
driver: json-file
options:
max-size: "10m"
max-file: "5"
environment:
HOOKS_HOST: "0.0.0.0"
HOOKS_PORT: "8080"
HOOKS_URL: "https://0.0.0.0:8080"
volumes:
- hooks_db:/app/var
volumes:
hooks_db:
Run docker-compose up -d
, wait for it to initialize completely, and visit http://localhost:8080
docker build -t dotzero/hooks .
git clone https://github.com/dotzero/hooks
cd hooks
go run .
Usage:
hooks [OPTIONS]
Application Options:
--host= listening address (default: 0.0.0.0) [$HOOKS_HOST]
--port= listening port (default: 8080) [$HOOKS_PORT]
--url= url to app (default: http://0.0.0.0:8080) [$HOOKS_URL]
--bolt-path= parent directory for the bolt files (default: ./var) [$BOLT_PATH]
--bolt-ttl= TTL in hours to keep data (default: 48) [$BOLT_TTL_HOURS]
--static-path= path to website assets (default: ./static) [$STATIC_PATH]
--tpl-path= path to templates files (default: ./templates) [$TPL_PATH]
--tpl-ext= templates files extensions (default: .html) [$TPL_EXT]
--verbose verbose logging
-v, --version show the version number
Help Options:
-h, --help Show this help message
HOOKS_HOST
(default:0.0.0.0
) - listening addressHOOKS_PORT
(default:8080
) - listening portHOOKS_URL
(default:http://0.0.0.0:8080
) - url to web UIBOLT_PATH
(default:./var
) - path to BoltDB database (it represents a consistent snapshot of your data)BOLT_TTL_HOURS
(default:48
) - TTL in hours to keep data persistentSTATIC_PATH
(default:./static
) - path to web assetsTPL_PATH
(default:./templates
) - path to templatesTPL_EXT
(default:.html
) - templates files extensions