mirror of
https://github.com/vimagick/dockerfiles.git
synced 2024-11-28 09:08:36 +02:00
update webhook
This commit is contained in:
parent
48e3c6f377
commit
f1ccc2f347
@ -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
|
||||
|
7
webhook/docker-compose.yml
Normal file
7
webhook/docker-compose.yml
Normal file
@ -0,0 +1,7 @@
|
||||
webhook:
|
||||
image: vimagick/webhook
|
||||
command: -hooks hooks.json -verbose
|
||||
ports:
|
||||
- "9000:9000"
|
||||
volumes:
|
||||
- "./scripts:/scripts"
|
Loading…
Reference in New Issue
Block a user