Fix legacy image files
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
parent
66d4e1fca3
commit
3f3df5bfac
|
@ -0,0 +1,3 @@
|
|||
:2015 {
|
||||
root /srv
|
||||
}
|
|
@ -0,0 +1,61 @@
|
|||
// +build ignore
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
"flag"
|
||||
"log"
|
||||
"os"
|
||||
"strings"
|
||||
"text/template"
|
||||
)
|
||||
|
||||
var plugins string
|
||||
var telemetry bool
|
||||
|
||||
func main() {
|
||||
flag.StringVar(&plugins, "plugins", "", "Specify plugins by full paths, seperated by commas")
|
||||
flag.BoolVar(&telemetry, "telemetry", false, "Enable telemetry")
|
||||
flag.Parse()
|
||||
|
||||
d := &data{
|
||||
Plugins: strings.FieldsFunc(plugins, func(c rune) bool { return c == ',' }),
|
||||
EnableTelemetry: telemetry,
|
||||
}
|
||||
|
||||
log.Printf("Additional plugins: %v", d.Plugins)
|
||||
log.Printf("Enabled telemetry: %v", d.EnableTelemetry)
|
||||
|
||||
f, err := os.Create("caddy.go")
|
||||
defer f.Close()
|
||||
if err != nil {
|
||||
log.Fatal("Unable to open file")
|
||||
}
|
||||
|
||||
t := template.Must(template.New("caddy.go").Parse(caddyTemplate))
|
||||
t.Execute(f, d)
|
||||
}
|
||||
|
||||
type data struct {
|
||||
Plugins []string
|
||||
EnableTelemetry bool
|
||||
}
|
||||
|
||||
var caddyTemplate = `
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/caddyserver/caddy/caddy/caddymain"
|
||||
|
||||
// plug in plugins here
|
||||
{{range $plugin := .Plugins}}
|
||||
_ "{{$plugin}}"
|
||||
{{end}}
|
||||
)
|
||||
|
||||
func main() {
|
||||
// optional: disable telemetry
|
||||
caddymain.EnableTelemetry = {{.EnableTelemetry}}
|
||||
caddymain.Run()
|
||||
}
|
||||
`
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
Maintainers: Ambrose Chua <ambrose@makerforce.io> (@serverwentdown)
|
||||
GitRepo: https://github.com/productionwentdown/caddy.git
|
||||
GitCommit: c50f1ef8cf50ef55c876620f987f069044a189d0
|
||||
GitCommit: 66d4e1fca30903cada7bdfb4274906f7585687e0
|
||||
|
||||
Tags: 2.0.0, 2, latest
|
||||
Architectures: amd64, arm64v8, arm32v6, arm32v7
|
||||
|
|
|
@ -16,7 +16,7 @@ ENV HOME=/
|
|||
VOLUME /config
|
||||
VOLUME /data
|
||||
|
||||
LABEL org.opencontainers.image.version=2.0.0
|
||||
LABEL org.opencontainers.image.version=v2.0.0
|
||||
LABEL org.opencontainers.image.title="Caddy (productionwentdown)"
|
||||
LABEL org.opencontainers.image.description="a powerful, enterprise-ready, open source web server with automatic HTTPS written in Go"
|
||||
LABEL org.opencontainers.image.url=https://productionwentdown.github.io
|
||||
|
|
Loading…
Reference in New Issue