Remove providerTemplates dir, moved in templates
This commit is contained in:
parent
1fdff9dae4
commit
5dea2e7902
11 changed files with 12 additions and 11 deletions
|
@ -162,7 +162,7 @@ func (provider *DockerProvider) loadDockerConfig(dockerClient *docker.Client) *C
|
|||
return nil
|
||||
}
|
||||
} else {
|
||||
buf, err := Asset("providerTemplates/docker.tmpl")
|
||||
buf, err := Asset("templates/docker.tmpl")
|
||||
if err != nil {
|
||||
log.Error("Error reading file", err)
|
||||
}
|
||||
|
|
|
@ -469,7 +469,7 @@ Labels can be used on containers to override default behaviour:
|
|||
- `traefik.weight=10`: assign this weight to the application
|
||||
- `traefik.enable=false`: disable this application in Træfɪk
|
||||
- `traefik.host=bar`: override the default routing from `{appName}.{domain}` to `bar.{domain}`
|
||||
- `traefik.prefixes=pf1,pf2`: use `PathPrefix(es)` instead of hostname for routing, use `filename="providerTemplates/marathon-prefix.tmpl"` with this option
|
||||
- `traefik.prefixes=pf1,pf2`: use `PathPrefix(es)` instead of hostname for routing, use `filename="templates/marathon-prefix.tmpl"` with this option
|
||||
* `traefik.domain=traefik.localhost`: override the default domain
|
||||
|
||||
## <a id="consul"></a> Consul backend
|
||||
|
|
|
@ -4,6 +4,6 @@ Copyright
|
|||
|
||||
//go:generate go get github.com/jteeuwen/go-bindata/...
|
||||
//go:generate rm -vf gen.go
|
||||
//go:generate go-bindata -o gen.go static/... templates/... providerTemplates/...
|
||||
//go:generate go-bindata -o gen.go static/... templates/...
|
||||
|
||||
package main
|
||||
|
|
2
kv.go
2
kv.go
|
@ -166,7 +166,7 @@ func (provider *KvProvider) loadConfig() *Configuration {
|
|||
return nil
|
||||
}
|
||||
} else {
|
||||
buf, err := Asset("providerTemplates/kv.tmpl")
|
||||
buf, err := Asset("templates/kv.tmpl")
|
||||
if err != nil {
|
||||
log.Error("Error reading file", err)
|
||||
}
|
||||
|
|
|
@ -167,7 +167,7 @@ func (provider *MarathonProvider) loadMarathonConfig() *Configuration {
|
|||
return nil
|
||||
}
|
||||
} else {
|
||||
buf, err := Asset("providerTemplates/marathon.tmpl")
|
||||
buf, err := Asset("templates/marathon.tmpl")
|
||||
if err != nil {
|
||||
log.Error("Error reading file", err)
|
||||
}
|
||||
|
|
|
@ -23,7 +23,6 @@ import (
|
|||
"github.com/mailgun/oxy/forward"
|
||||
"github.com/mailgun/oxy/roundrobin"
|
||||
"github.com/thoas/stats"
|
||||
"github.com/unrolled/render"
|
||||
"gopkg.in/alecthomas/kingpin.v2"
|
||||
"runtime"
|
||||
)
|
||||
|
@ -36,11 +35,6 @@ var (
|
|||
currentConfigurations = make(configs)
|
||||
metrics = stats.New()
|
||||
oxyLogger = &OxyLogger{}
|
||||
templatesRenderer = render.New(render.Options{
|
||||
Directory: "templates",
|
||||
Asset: Asset,
|
||||
AssetNames: AssetNames,
|
||||
})
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
7
web.go
7
web.go
|
@ -9,6 +9,7 @@ import (
|
|||
log "github.com/Sirupsen/logrus"
|
||||
"github.com/elazarl/go-bindata-assetfs"
|
||||
"github.com/gorilla/mux"
|
||||
"github.com/unrolled/render"
|
||||
)
|
||||
|
||||
type WebProvider struct {
|
||||
|
@ -16,6 +17,12 @@ type WebProvider struct {
|
|||
CertFile, KeyFile string
|
||||
}
|
||||
|
||||
var (
|
||||
templatesRenderer = render.New(render.Options{
|
||||
Directory: "nowhere",
|
||||
})
|
||||
)
|
||||
|
||||
func (provider *WebProvider) Provide(configurationChan chan<- configMessage) error {
|
||||
systemRouter := mux.NewRouter()
|
||||
|
||||
|
|
Loading…
Reference in a new issue