1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2024-12-25 02:04:06 +02:00
dockerfiles/webhook
2015-11-05 12:24:32 +08:00
..
docker-compose.yml update webhook 2015-11-05 12:20:42 +08:00
Dockerfile fix webhook 2015-11-05 12:24:32 +08:00
Makefile add webhook 2015-11-05 11:32:10 +08:00
README.md update webhook 2015-11-05 12:20:42 +08:00
webhook add webhook 2015-11-05 11:32:10 +08:00

webhook

webhook is a lightweight configurable tool written in Go, that allows you to easily create HTTP endpoints (hooks) on your server, which you can use to execute configured commands.

Directory Tree

~/fig/webhook/
├── docker-compose.yml
└── scripts/
    ├── hooks.json
    └── test.sh*

docker-compose.yml

webhook:
  image: vimagick/webhook
  command: -hooks hooks.json -verbose
  ports:
    - "9000:9000"
  volumes:
    - "./scripts:/scripts"

hooks.json

[
  {
    "id": "test",
    "execute-command": "/scripts/test.sh",
    "command-working-directory": "/scripts"
  }
]

test.sh

#!/bin/bash
echo 'hello world'

Up and Running

$ docker-compose up -d
$ docker-compose logs
$ curl localhost:9000/hooks/test