1
2
mirror of https://github.com/vimagick/dockerfiles synced 2024-06-25 16:28:40 +00:00
dockerfiles/webhook/README.md

59 lines
842 B
Markdown
Raw Normal View History

2015-11-05 03:32:10 +00:00
webhook
=======
[webhook][1] 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.
2015-11-05 04:20:42 +00:00
## 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
```
2015-11-05 03:32:10 +00:00
[1]: https://github.com/adnanh/webhook