mirror of
https://github.com/vimagick/dockerfiles
synced 2024-06-28 09:41:20 +00:00
update webhook
This commit is contained in:
parent
48e3c6f377
commit
f1ccc2f347
@ -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
|
||||||
|
@ -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"]
|
||||||
|
@ -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
|
||||||
|
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