2
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2025-12-21 13:23:02 +01: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

View File

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

View File

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

View File

@@ -5,4 +5,54 @@ webhook
to easily create HTTP endpoints (hooks) on your server, which you can use to to easily create HTTP endpoints (hooks) on your server, which you can use to
execute configured commands. 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 [1]: https://github.com/adnanh/webhook

View File

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