1
2
mirror of https://github.com/vimagick/dockerfiles synced 2024-06-16 03:48:44 +00:00

update webhook

This commit is contained in:
kev 2015-11-05 12:20:42 +08:00
parent 48e3c6f377
commit f1ccc2f347
4 changed files with 71 additions and 3 deletions

@ -73,6 +73,7 @@ dockerfiles
- [x] tmail :beetle:
- [x] tor
- [x] urlwatch :beetle:
- [x] webhook
- [x] webkit :beetle:
- [x] youtube :beetle:
- [x] youtube-dl

@ -2,7 +2,17 @@
# Dockerfile for webhook
#
FROM scratch
COPY webhook /
ENTRYPOINT ["/webhook"]
FROM alpine
MAINTAINER kev <noreply@datageek.info>
RUN apk add -U bash
COPY webhook /usr/local/bin
WORKDIR /scripts
VOLUME /scripts
EXPOSE 9000
ENTRYPOINT ["webhook"]
CMD ["-help"]

@ -5,4 +5,54 @@ webhook
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
```
[1]: https://github.com/adnanh/webhook

@ -0,0 +1,7 @@
webhook:
image: vimagick/webhook
command: -hooks hooks.json -verbose
ports:
- "9000:9000"
volumes:
- "./scripts:/scripts"