Add lots of plugins to cadmium
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1,2 +1,2 @@
|
|||||||
/cadmium
|
/cadmium
|
||||||
/source
|
/gopath
|
||||||
|
@@ -13,7 +13,7 @@ build:
|
|||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- cadmium
|
- cadmium
|
||||||
- source
|
- gopath
|
||||||
- plugins.txt
|
- plugins.txt
|
||||||
only:
|
only:
|
||||||
- tags
|
- tags
|
||||||
|
50
patches/plugins.go
Normal file
50
patches/plugins.go
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
package caddymain
|
||||||
|
|
||||||
|
import (
|
||||||
|
// Directives / Middleware
|
||||||
|
_ "github.com/linkonoid/caddy-dyndns"
|
||||||
|
_ "github.com/casbin/caddy-authz"
|
||||||
|
_ "github.com/miquella/caddy-awses"
|
||||||
|
_ "github.com/coopernurse/caddy-awslambda"
|
||||||
|
_ "github.com/nicolasazrak/caddy-cache"
|
||||||
|
_ "github.com/jung-kurt/caddy-cgi"
|
||||||
|
_ "github.com/captncraig/cors"
|
||||||
|
_ "github.com/payintech/caddy-datadog"
|
||||||
|
_ "github.com/epicagency/caddy-expires"
|
||||||
|
_ "github.com/filebrowser/filebrowser/caddy/filemanager"
|
||||||
|
_ "github.com/echocat/caddy-filter"
|
||||||
|
_ "github.com/caddyserver/forwardproxy"
|
||||||
|
_ "github.com/kodnaplakal/caddy-geoip"
|
||||||
|
_ "github.com/abiosoft/caddy-git"
|
||||||
|
_ "github.com/zikes/gopkg"
|
||||||
|
_ "github.com/pieterlouw/caddy-grpc"
|
||||||
|
_ "github.com/filebrowser/filebrowser/caddy/hugo"
|
||||||
|
_ "github.com/pyed/ipfilter"
|
||||||
|
_ "github.com/filebrowser/filebrowser/caddy/jekyll"
|
||||||
|
_ "github.com/BTBurke/caddy-jwt"
|
||||||
|
_ "github.com/simia-tech/caddy-locale"
|
||||||
|
_ "github.com/tarent/loginsrv/caddy"
|
||||||
|
_ "github.com/SchumacherFM/mailout"
|
||||||
|
_ "github.com/hacdias/caddy-minify"
|
||||||
|
_ "github.com/Xumeiquer/nobots"
|
||||||
|
_ "github.com/miekg/caddy-prometheus"
|
||||||
|
_ "github.com/mastercactapus/caddy-proxyprotocol"
|
||||||
|
_ "github.com/xuqingfeng/caddy-rate-limit"
|
||||||
|
_ "github.com/captncraig/caddy-realip"
|
||||||
|
_ "github.com/freman/caddy-reauth"
|
||||||
|
// TODO: _ "github.com/restic/caddy" fails to build
|
||||||
|
_ "blitznote.com/src/caddy.upload"
|
||||||
|
_ "github.com/hacdias/caddy-webdav"
|
||||||
|
|
||||||
|
// DNS providers (TODO)
|
||||||
|
|
||||||
|
// Caddyfile loaders
|
||||||
|
_ "github.com/lucaslorentz/caddy-docker-proxy/plugin"
|
||||||
|
|
||||||
|
// Server types
|
||||||
|
// TODO: DNS. Should be CoreDNS: https://github.com/coredns/coredns
|
||||||
|
_ "github.com/pieterlouw/caddy-net/caddynet"
|
||||||
|
|
||||||
|
// Event hooks
|
||||||
|
_ "github.com/hacdias/caddy-service"
|
||||||
|
)
|
@@ -8,7 +8,7 @@ fi
|
|||||||
echo "Building Cadmium $1..."
|
echo "Building Cadmium $1..."
|
||||||
|
|
||||||
cm="github.com/mholt/caddy/caddy/caddymain"
|
cm="github.com/mholt/caddy/caddy/caddymain"
|
||||||
go build \
|
GOPATH="$(pwd)/gopath" go build \
|
||||||
-o cadmium \
|
-o cadmium \
|
||||||
-ldflags "-X \"$cm.gitTag=$1\" -X \"$cm.gitNearestTag=$1\"" \
|
-ldflags "-X \"$cm.gitTag=$1\" -X \"$cm.gitNearestTag=$1\"" \
|
||||||
github.com/mholt/caddy/caddy
|
github.com/mholt/caddy/caddy
|
||||||
|
@@ -1,24 +1,78 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
if [ "x$1" = "x" ]; then
|
if [ "x$1" = "x" ]; then
|
||||||
echo "Usage: $0 <Tarball URL>"
|
echo "Usage: $0 <Tarball URL>"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -e "source" ]; then
|
if [ -e "gopath" ]; then
|
||||||
echo "source/ directory already exists, remove it first"
|
echo "gopath/ directory already exists, remove it first"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
curl -L "$1" | tar -xzf -
|
go_get() {
|
||||||
mv caddy* source
|
GOPATH="$(pwd)/gopath" go get -v "$@"
|
||||||
|
}
|
||||||
|
|
||||||
|
mkdir -p gopath/src/github.com/mholt/caddy
|
||||||
|
curl -L "$1" | tar --strip-components=1 -C gopath/src/github.com/mholt/caddy -xzf -
|
||||||
|
|
||||||
# Disable telemetry in run.go and rename to Cadmium
|
# Disable telemetry in run.go and rename to Cadmium
|
||||||
patch -d source -p1 <"$(pwd)/patches/run.go.diff"
|
patch -d gopath/src/github.com/mholt/caddy -p1 <"$(pwd)/patches/run.go.diff"
|
||||||
|
|
||||||
# Replace telemetry with a stub
|
# Replace telemetry with a stub
|
||||||
rm -r source/telemetry
|
rm -r gopath/src/github.com/mholt/caddy/telemetry
|
||||||
mkdir source/telemetry
|
mkdir gopath/src/github.com/mholt/caddy/telemetry
|
||||||
cp patches/collection.go source/telemetry/collection.go
|
cp patches/collection.go gopath/src/github.com/mholt/caddy/telemetry/collection.go
|
||||||
|
cp patches/plugins.go gopath/src/github.com/mholt/caddy/caddy/caddymain/plugins.go
|
||||||
|
|
||||||
|
## Now download all the plugins ##
|
||||||
|
|
||||||
|
# Directives / Middleware
|
||||||
|
go_get github.com/linkonoid/caddy-dyndns
|
||||||
|
go_get github.com/casbin/caddy-authz
|
||||||
|
go_get github.com/miquella/caddy-awses
|
||||||
|
go_get github.com/coopernurse/caddy-awslambda
|
||||||
|
go_get github.com/nicolasazrak/caddy-cache
|
||||||
|
go_get github.com/jung-kurt/caddy-cgi
|
||||||
|
go_get github.com/captncraig/cors
|
||||||
|
go_get github.com/payintech/caddy-datadog
|
||||||
|
go_get github.com/epicagency/caddy-expires
|
||||||
|
go_get github.com/filebrowser/filebrowser/caddy/filemanager
|
||||||
|
go_get github.com/echocat/caddy-filter
|
||||||
|
go_get github.com/caddyserver/forwardproxy
|
||||||
|
go_get github.com/kodnaplakal/caddy-geoip
|
||||||
|
go_get github.com/abiosoft/caddy-git
|
||||||
|
go_get github.com/zikes/gopkg
|
||||||
|
go_get github.com/pieterlouw/caddy-grpc
|
||||||
|
go_get github.com/filebrowser/filebrowser/caddy/hugo
|
||||||
|
go_get github.com/pyed/ipfilter
|
||||||
|
go_get github.com/filebrowser/filebrowser/caddy/jekyll
|
||||||
|
go_get github.com/BTBurke/caddy-jwt
|
||||||
|
go_get github.com/simia-tech/caddy-locale
|
||||||
|
go_get github.com/tarent/loginsrv/caddy
|
||||||
|
go_get github.com/SchumacherFM/mailout
|
||||||
|
go_get github.com/hacdias/caddy-minify
|
||||||
|
go_get github.com/Xumeiquer/nobots
|
||||||
|
go_get github.com/miekg/caddy-prometheus
|
||||||
|
go_get github.com/mastercactapus/caddy-proxyprotocol
|
||||||
|
go_get github.com/xuqingfeng/caddy-rate-limit
|
||||||
|
go_get github.com/captncraig/caddy-realip
|
||||||
|
go_get github.com/freman/caddy-reauth
|
||||||
|
# TODO: go_get github.com/restic/caddy fails to build
|
||||||
|
go_get blitznote.com/src/caddy.upload
|
||||||
|
go_get github.com/hacdias/caddy-webdav
|
||||||
|
|
||||||
|
# DNS providers (TODO)
|
||||||
|
|
||||||
|
# Caddyfile loaders
|
||||||
|
go_get github.com/lucaslorentz/caddy-docker-proxy/plugin
|
||||||
|
|
||||||
|
# Server types
|
||||||
|
# TODO: DNS. Should be CoreDNS: https://github.com/coredns/coredns
|
||||||
|
go_get github.com/pieterlouw/caddy-net
|
||||||
|
|
||||||
|
# Event hooks
|
||||||
|
go_get github.com/hacdias/caddy-service
|
||||||
|
Reference in New Issue
Block a user