1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2024-12-21 01:27:01 +02:00

add rehook

This commit is contained in:
kev 2020-10-27 18:20:06 +08:00
parent 9500190829
commit 9b3c68e4f5
5 changed files with 67 additions and 0 deletions

View File

@ -129,6 +129,7 @@ A collection of delicious docker recipes.
- [x] portia
- [x] pure-ftpd
- [x] redis-arm
- [x] rehook
- [x] rinetd
- [x] rslsync
- [x] rsyncd

24
rehook/Dockerfile Normal file
View File

@ -0,0 +1,24 @@
#
# Dockerfile for rehook
#
FROM golang:alpine AS build
ENV CGO_ENABLED=0
ENV GOOS=linux
ENV GOARCH=amd64
WORKDIR /go/bin
RUN apk add --no-cache git
RUN go get -d -v github.com/jstemmer/rehook
RUN go build --ldflags '-s -extldflags "-static"' -i -o rehook github.com/jstemmer/rehook
FROM alpine:3
MAINTAINER EasyPi Software Foundation
WORKDIR /opt/rehook
RUN mkdir -p bin etc log
RUN apk add --no-cache bash coreutils curl jq
COPY --from=build /go/src/github.com/jstemmer/rehook/public public
COPY --from=build /go/src/github.com/jstemmer/rehook/views views
COPY --from=build /go/bin/rehook bin
EXPOSE 9000 9001
ENTRYPOINT ["bin/rehook"]
CMD ["-db", "etc/rehook.db", "-http", ":9000", "-admin", ":9001"]

10
rehook/README.md Normal file
View File

@ -0,0 +1,10 @@
rehook
======
[Rehook][1] - a webhook dispatcher, filtering incoming requests from external
services and acting on them.
To view `etc/rehook.db`, please install [boltbrowser][2]
[1]: https://github.com/jstemmer/rehook
[2]: https://github.com/br0xen/boltbrowser

View File

@ -0,0 +1,9 @@
rehook:
image: vimagick/rehook
ports:
- "9000:9000"
- "9001:9001"
volumes:
- "./data/etc:/opt/rehook/etc"
- "./data/log:/opt/rehook/log"
restart: unless-stopped

23
rehook/nginx.conf Normal file
View File

@ -0,0 +1,23 @@
server {
listen 80;
server_name rehook.example.com;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl;
server_name rehook.example.com;
ssl_certificate ssl/example.com.crt;
ssl_certificate_key ssl/example.com.key;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers HIGH:!aNULL:!MD5;
auth_basic "Restricted";
auth_basic_user_file /etc/nginx/htpasswd;
location / {
proxy_pass http://127.0.0.1:9001;
}
location /h/ {
auth_basic "off";
proxy_pass http://127.0.0.1:9000;
}
}