1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2024-12-25 02:04:06 +02:00

update webhook

This commit is contained in:
kev 2021-03-26 12:46:59 +08:00
parent 7b589c4849
commit b8d6c87248
3 changed files with 7 additions and 10 deletions

View File

@ -11,7 +11,7 @@ RUN apk add --no-cache git
RUN go get -d -v github.com/adnanh/webhook
RUN go build --ldflags '-s -extldflags "-static"' -i -o webhook github.com/adnanh/webhook
FROM alpine
FROM alpine:3
MAINTAINER EasyPi Software Foundation
RUN apk add --no-cache bash coreutils curl jq
COPY --from=build /go/bin/webhook /usr/local/bin/
@ -19,4 +19,5 @@ WORKDIR /etc/webhook
VOLUME /etc/webhook
EXPOSE 9000
ENTRYPOINT ["webhook"]
CMD ["-hooks", "hooks.json", "-hotreload", "-template", "-verbose"]
# Doc: https://github.com/adnanh/webhook/blob/master/docs/Webhook-Parameters.md
CMD ["-hooks", "hooks.json", "-hooks", "hooks.yaml", "-hotreload", "-template", "-verbose"]

View File

@ -1,8 +1 @@
[
{
"id": "test",
"execute-command": "/etc/webhook/test.sh",
"command-working-directory": "/etc/webhook",
"include-command-output-in-response": true
}
]
[]

View File

@ -1,2 +1,5 @@
#!/bin/bash
echo 'hello world'
cat $HOOK_PAYLOAD