traefik.toml comments
This commit is contained in:
parent
341002e005
commit
0b6a3ae669
15
README.md
15
README.md
|
@ -30,18 +30,19 @@ It supports several backends (Docker, Mesos/Marathon, Consul, Etcd, Rest API, fi
|
||||||
|
|
||||||
# Quick start
|
# Quick start
|
||||||
|
|
||||||
* The simple way: go to the [releases](https://github.com/emilevauge/traefik/releases) page and get a binary.
|
* The simple way: go to the [releases](https://github.com/emilevauge/traefik/releases) page and get a binary for your platform.
|
||||||
* Or simply execute:
|
Just run it!
|
||||||
|
|
||||||
```
|
|
||||||
go get github.com/emilevauge/traefik
|
|
||||||
```
|
|
||||||
* Just run it!
|
|
||||||
|
|
||||||
```
|
```
|
||||||
./traefik traefik.toml
|
./traefik traefik.toml
|
||||||
```
|
```
|
||||||
|
|
||||||
|
* Use the tiny Docker image:
|
||||||
|
|
||||||
|
```
|
||||||
|
docker run -t -p 8081:8080 -p 80:80 -v $PWD/traefik.toml:/traefik.toml emilevauge/traefik
|
||||||
|
```
|
||||||
|
|
||||||
# Configuration
|
# Configuration
|
||||||
|
|
||||||
## Global configuration
|
## Global configuration
|
||||||
|
|
|
@ -10,7 +10,7 @@ dependencies:
|
||||||
- CGO_ENABLED=0 go build -a -installsuffix nocgo .
|
- CGO_ENABLED=0 go build -a -installsuffix nocgo .
|
||||||
- go get github.com/mitchellh/gox
|
- go get github.com/mitchellh/gox
|
||||||
- go get github.com/tcnksm/ghr
|
- go get github.com/tcnksm/ghr
|
||||||
- gox -verbose -os "linux darwin windows" -output "dist/$CIRCLE_PROJECT_REPONAME_{{.OS}}_{{.Arch}}"
|
- gox -verbose -os "linux darwin windows"
|
||||||
|
|
||||||
override:
|
override:
|
||||||
- echo $REPO
|
- echo $REPO
|
||||||
|
|
|
@ -17,7 +17,7 @@ type GlobalConfiguration struct {
|
||||||
func NewGlobalConfiguration() *GlobalConfiguration {
|
func NewGlobalConfiguration() *GlobalConfiguration {
|
||||||
globalConfiguration := new(GlobalConfiguration)
|
globalConfiguration := new(GlobalConfiguration)
|
||||||
// default values
|
// default values
|
||||||
globalConfiguration.Port = ":8080"
|
globalConfiguration.Port = ":80"
|
||||||
globalConfiguration.GraceTimeOut = 10
|
globalConfiguration.GraceTimeOut = 10
|
||||||
globalConfiguration.LogLevel = "ERROR"
|
globalConfiguration.LogLevel = "ERROR"
|
||||||
globalConfiguration.TraefikLogsStdout = true
|
globalConfiguration.TraefikLogsStdout = true
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# Træfɪk
|
# Træfɪk Roadmap
|
||||||
|
|
||||||
* Add traefik.protocol label
|
* Add traefik.protocol label
|
||||||
* Providers recovery
|
* Providers recovery
|
||||||
|
@ -7,7 +7,6 @@
|
||||||
* Retry with streams
|
* Retry with streams
|
||||||
* Licence
|
* Licence
|
||||||
* Add traefik.indlude all/enabled policy
|
* Add traefik.indlude all/enabled policy
|
||||||
* SSL backends support
|
|
||||||
* Consul support
|
* Consul support
|
||||||
* README
|
* README
|
||||||
* API enhancements
|
* API enhancements
|
||||||
|
@ -26,6 +25,7 @@
|
||||||
* ~~Filter no exposed port apps~~
|
* ~~Filter no exposed port apps~~
|
||||||
* ~~Logs~~
|
* ~~Logs~~
|
||||||
* ~~SSL frontend support~~
|
* ~~SSL frontend support~~
|
||||||
|
* ~~SSL backends support~~
|
||||||
* ~~Static files~~
|
* ~~Static files~~
|
||||||
* ~~Metrics~~
|
* ~~Metrics~~
|
||||||
* ~~Dockerfile~~
|
* ~~Dockerfile~~
|
||||||
|
|
233
traefik.toml
233
traefik.toml
|
@ -1,56 +1,205 @@
|
||||||
port = ":8001"
|
################################################################
|
||||||
graceTimeOut = 10
|
# Global configuration
|
||||||
|
################################################################
|
||||||
|
|
||||||
|
# Reverse proxy port
|
||||||
|
#
|
||||||
|
# Optional
|
||||||
|
# Default: ":80"
|
||||||
|
#
|
||||||
|
# port = ":80"
|
||||||
|
|
||||||
|
# Timeout in seconds.
|
||||||
|
# Duration to give active requests a chance to finish during hot-reloads
|
||||||
|
#
|
||||||
|
# Optional
|
||||||
|
# Default: 10
|
||||||
|
#
|
||||||
|
# graceTimeOut = 10
|
||||||
|
|
||||||
|
# Traefik logs file
|
||||||
|
#
|
||||||
|
# Optional
|
||||||
|
#
|
||||||
# traefikLogsFile = "log/traefik.log"
|
# traefikLogsFile = "log/traefik.log"
|
||||||
traefikLogsStdout = true
|
|
||||||
accessLogsFile = "log/access.log"
|
# Traefik log to standard output
|
||||||
logLevel = "DEBUG"
|
#
|
||||||
|
# Optional
|
||||||
|
# Default: true
|
||||||
|
#
|
||||||
|
# traefikLogsStdout = true
|
||||||
|
|
||||||
|
# Access logs file
|
||||||
|
#
|
||||||
|
# Optional
|
||||||
|
#
|
||||||
|
# accessLogsFile = "log/access.log"
|
||||||
|
|
||||||
|
# Log level
|
||||||
|
#
|
||||||
|
# Optional
|
||||||
|
# Default: "ERROR"
|
||||||
|
#
|
||||||
|
# logLevel = "ERROR"
|
||||||
|
|
||||||
|
# SSL certificate and key used
|
||||||
|
#
|
||||||
|
# Optional
|
||||||
|
#
|
||||||
# CertFile = "traefik.crt"
|
# CertFile = "traefik.crt"
|
||||||
# KeyFile = "traefik.key"
|
# KeyFile = "traefik.key"
|
||||||
|
|
||||||
[docker]
|
################################################################
|
||||||
endpoint = "unix:///var/run/docker.sock"
|
# Web configuration backend
|
||||||
watch = true
|
################################################################
|
||||||
domain = "localhost"
|
|
||||||
|
# Enable web configuration backend
|
||||||
|
#
|
||||||
|
# Optional
|
||||||
|
#
|
||||||
|
# [web]
|
||||||
|
|
||||||
|
# Web administration port
|
||||||
|
#
|
||||||
|
# Required
|
||||||
|
#
|
||||||
|
# address = ":8080"
|
||||||
|
|
||||||
|
|
||||||
|
################################################################
|
||||||
|
# File configuration backend
|
||||||
|
################################################################
|
||||||
|
|
||||||
|
# Enable file configuration backend
|
||||||
|
#
|
||||||
|
# Optional
|
||||||
|
#
|
||||||
|
# [file]
|
||||||
|
|
||||||
|
# Rules file
|
||||||
|
# If defined, traefik will load rules from this file,
|
||||||
|
# otherwise, it will load rules from current file (cf Sample rules below).
|
||||||
|
#
|
||||||
|
# Optional
|
||||||
|
#
|
||||||
|
# filename = "rules.toml"
|
||||||
|
|
||||||
|
# Enable watch file changes
|
||||||
|
#
|
||||||
|
# Optional
|
||||||
|
#
|
||||||
|
# watch = true
|
||||||
|
|
||||||
|
|
||||||
|
################################################################
|
||||||
|
# Docker configuration backend
|
||||||
|
################################################################
|
||||||
|
|
||||||
|
# Enable Docker configuration backend
|
||||||
|
#
|
||||||
|
# Optional
|
||||||
|
#
|
||||||
|
# [docker]
|
||||||
|
|
||||||
|
# Docker server endpoint. Can be a tcp or a unix socket endpoint.
|
||||||
|
#
|
||||||
|
# Required
|
||||||
|
#
|
||||||
|
# endpoint = "unix:///var/run/docker.sock"
|
||||||
|
|
||||||
|
# Enable watch docker changes
|
||||||
|
#
|
||||||
|
# Optional
|
||||||
|
#
|
||||||
|
# watch = true
|
||||||
|
|
||||||
|
# Default domain used.
|
||||||
|
# Can be overridden by setting the "traefik.domain" label on a container.
|
||||||
|
#
|
||||||
|
# Required
|
||||||
|
#
|
||||||
|
# domain = "docker.localhost"
|
||||||
|
|
||||||
|
# Override default configuration template. For advanced users :)
|
||||||
|
#
|
||||||
|
# Optional
|
||||||
|
#
|
||||||
# filename = "docker.tmpl"
|
# filename = "docker.tmpl"
|
||||||
|
|
||||||
|
|
||||||
|
################################################################
|
||||||
|
# Mesos/Marathon configuration backend
|
||||||
|
################################################################
|
||||||
|
|
||||||
|
# Enable Marathon configuration backend
|
||||||
|
#
|
||||||
|
# Optional
|
||||||
|
#
|
||||||
# [marathon]
|
# [marathon]
|
||||||
|
|
||||||
|
# Marathon server endpoint.
|
||||||
|
# You can also specify multiple endpoint for Marathon:
|
||||||
|
# endpoint := "http://10.241.1.71:8080,10.241.1.72:8080,10.241.1.73:8080"
|
||||||
|
#
|
||||||
|
# Required
|
||||||
|
#
|
||||||
# endpoint = "http://127.0.0.1:8080"
|
# endpoint = "http://127.0.0.1:8080"
|
||||||
|
|
||||||
|
# Network interface used to call Marathon web services
|
||||||
|
# Optional
|
||||||
|
# Default: "eth0"
|
||||||
|
#
|
||||||
# networkInterface = "eth0"
|
# networkInterface = "eth0"
|
||||||
|
|
||||||
|
# Enable watch Marathon changes
|
||||||
|
#
|
||||||
|
# Optional
|
||||||
|
#
|
||||||
# watch = true
|
# watch = true
|
||||||
# domain = "toto.fr"
|
|
||||||
|
# Default domain used.
|
||||||
|
# Can be overridden by setting the "traefik.domain" label on an application.
|
||||||
|
#
|
||||||
|
# Required
|
||||||
|
#
|
||||||
|
# domain = "marathon.localhost"
|
||||||
|
|
||||||
|
# Override default configuration template. For advanced users :)
|
||||||
|
#
|
||||||
|
# Optional
|
||||||
|
#
|
||||||
# filename = "marathon.tmpl"
|
# filename = "marathon.tmpl"
|
||||||
|
|
||||||
[web]
|
|
||||||
address = ":8010"
|
|
||||||
|
|
||||||
#[file]
|
|
||||||
# filename = "rules.toml"
|
|
||||||
watch = true
|
|
||||||
|
|
||||||
[backends]
|
################################################################
|
||||||
[backends.backend1]
|
# Sample rules
|
||||||
[backends.backend1.servers.server1]
|
################################################################
|
||||||
url = "http://172.17.0.2:80"
|
# [backends]
|
||||||
weight = 10
|
# [backends.backend1]
|
||||||
[backends.backend1.servers.server2]
|
# [backends.backend1.servers.server1]
|
||||||
url = "http://172.17.0.3:80"
|
# url = "http://172.17.0.2:80"
|
||||||
weight = 1
|
# weight = 10
|
||||||
[backends.backend2]
|
# [backends.backend1.servers.server2]
|
||||||
[backends.backend2.servers.server1]
|
# url = "http://172.17.0.3:80"
|
||||||
url = "https://www.google.fr"
|
# weight = 1
|
||||||
weight = 1
|
# [backends.backend2]
|
||||||
[backends.backend2.servers.server2]
|
# [backends.backend2.servers.server1]
|
||||||
url = "http://www.wikipedia.fr"
|
# url = "http://172.17.0.4:80"
|
||||||
weight = 2
|
# weight = 1
|
||||||
|
# [backends.backend2.servers.server2]
|
||||||
[routes]
|
# url = "http://172.17.0.5:80"
|
||||||
[routes.route1]
|
# weight = 2
|
||||||
backend = "backend2"
|
#
|
||||||
[routes.route1.rules.test_zenika_1]
|
# [routes]
|
||||||
category = "Host"
|
# [routes.route1]
|
||||||
value = "test.localhost"
|
# backend = "backend2"
|
||||||
[routes.route2]
|
# [routes.route1.rules.test_1]
|
||||||
backend = "backend1"
|
# category = "Host"
|
||||||
[routes.route2.rules.test_zenika_2]
|
# value = "test.localhost"
|
||||||
category = "Path"
|
# [routes.route2]
|
||||||
value = "/test"
|
# backend = "backend1"
|
||||||
|
# [routes.route2.rules.test_2]
|
||||||
|
# category = "Path"
|
||||||
|
# value = "/test"
|
||||||
|
|
Loading…
Reference in a new issue