2019-04-12 17:42:03 +00:00
|
|
|
################################################################
|
|
|
|
#
|
2019-07-22 07:58:04 +00:00
|
|
|
# Configuration sample for Traefik v2.
|
|
|
|
#
|
2019-04-12 17:42:03 +00:00
|
|
|
# For Traefik v1: https://github.com/containous/traefik/blob/v1.7/traefik.sample.toml
|
|
|
|
#
|
|
|
|
################################################################
|
|
|
|
|
2015-09-14 13:38:58 +00:00
|
|
|
################################################################
|
|
|
|
# Global configuration
|
|
|
|
################################################################
|
2019-03-25 16:20:04 +00:00
|
|
|
[global]
|
|
|
|
checkNewVersion = true
|
|
|
|
sendAnonymousUsage = true
|
2015-09-14 13:38:58 +00:00
|
|
|
|
2018-03-12 09:40:04 +00:00
|
|
|
################################################################
|
|
|
|
# Entrypoints configuration
|
|
|
|
################################################################
|
|
|
|
|
2017-08-28 16:07:37 +00:00
|
|
|
# Entrypoints definition
|
2016-03-15 15:50:14 +00:00
|
|
|
#
|
|
|
|
# Optional
|
2017-08-28 16:07:37 +00:00
|
|
|
# Default:
|
2019-04-15 09:14:05 +00:00
|
|
|
[entryPoints]
|
2019-07-01 09:30:05 +00:00
|
|
|
[entryPoints.web]
|
2019-07-22 07:58:04 +00:00
|
|
|
address = ":80"
|
|
|
|
|
|
|
|
[entryPoints.websecure]
|
|
|
|
address = ":443"
|
2016-03-15 15:50:14 +00:00
|
|
|
|
2018-03-12 09:40:04 +00:00
|
|
|
################################################################
|
|
|
|
# Traefik logs configuration
|
|
|
|
################################################################
|
|
|
|
|
2017-09-21 08:42:02 +00:00
|
|
|
# Traefik logs
|
|
|
|
# Enabled by default and log to stdout
|
|
|
|
#
|
|
|
|
# Optional
|
|
|
|
#
|
2019-03-25 16:20:04 +00:00
|
|
|
[log]
|
|
|
|
|
2019-07-22 07:58:04 +00:00
|
|
|
# Log level
|
|
|
|
#
|
|
|
|
# Optional
|
|
|
|
# Default: "ERROR"
|
|
|
|
#
|
|
|
|
# level = "DEBUG"
|
2017-09-21 08:42:02 +00:00
|
|
|
|
2019-07-22 07:58:04 +00:00
|
|
|
# Sets the filepath for the traefik log. If not specified, stdout will be used.
|
|
|
|
# Intermediate directories are created if necessary.
|
|
|
|
#
|
|
|
|
# Optional
|
|
|
|
# Default: os.Stdout
|
|
|
|
#
|
|
|
|
# filePath = "log/traefik.log"
|
2017-09-21 08:42:02 +00:00
|
|
|
|
2019-07-22 07:58:04 +00:00
|
|
|
# Format is either "json" or "common".
|
|
|
|
#
|
|
|
|
# Optional
|
|
|
|
# Default: "common"
|
|
|
|
#
|
|
|
|
# format = "json"
|
2017-09-21 08:42:02 +00:00
|
|
|
|
2018-03-12 09:40:04 +00:00
|
|
|
################################################################
|
|
|
|
# Access logs configuration
|
|
|
|
################################################################
|
|
|
|
|
2017-05-30 10:06:49 +00:00
|
|
|
# Enable access logs
|
|
|
|
# By default it will write to stdout and produce logs in the textual
|
|
|
|
# Common Log Format (CLF), extended with additional fields.
|
2017-05-25 11:25:53 +00:00
|
|
|
#
|
|
|
|
# Optional
|
|
|
|
#
|
|
|
|
# [accessLog]
|
|
|
|
|
2019-07-22 07:58:04 +00:00
|
|
|
# Sets the file path for the access log. If not specified, stdout will be used.
|
|
|
|
# Intermediate directories are created if necessary.
|
|
|
|
#
|
|
|
|
# Optional
|
|
|
|
# Default: os.Stdout
|
|
|
|
#
|
|
|
|
# filePath = "/path/to/log/log.txt"
|
2017-05-25 11:25:53 +00:00
|
|
|
|
2019-07-22 07:58:04 +00:00
|
|
|
# Format is either "json" or "common".
|
|
|
|
#
|
|
|
|
# Optional
|
|
|
|
# Default: "common"
|
|
|
|
#
|
|
|
|
# format = "json"
|
2017-05-25 11:25:53 +00:00
|
|
|
|
2015-09-14 13:38:58 +00:00
|
|
|
################################################################
|
2018-03-12 09:40:04 +00:00
|
|
|
# API and dashboard configuration
|
2015-09-14 13:38:58 +00:00
|
|
|
################################################################
|
|
|
|
|
2018-03-12 09:40:04 +00:00
|
|
|
# Enable API and dashboard
|
|
|
|
[api]
|
2015-09-14 13:38:58 +00:00
|
|
|
|
2019-11-08 14:00:06 +00:00
|
|
|
# Enable the API in insecure mode
|
2018-03-12 09:40:04 +00:00
|
|
|
#
|
|
|
|
# Optional
|
2019-11-08 14:00:06 +00:00
|
|
|
# Default: true
|
2018-03-12 09:40:04 +00:00
|
|
|
#
|
2019-11-08 14:00:06 +00:00
|
|
|
# insecure = false
|
2018-03-12 09:40:04 +00:00
|
|
|
|
|
|
|
# Enabled Dashboard
|
|
|
|
#
|
|
|
|
# Optional
|
|
|
|
# Default: true
|
|
|
|
#
|
|
|
|
# dashboard = false
|
|
|
|
|
|
|
|
################################################################
|
|
|
|
# Ping configuration
|
|
|
|
################################################################
|
|
|
|
|
|
|
|
# Enable ping
|
|
|
|
[ping]
|
|
|
|
|
|
|
|
# Name of the related entry point
|
|
|
|
#
|
|
|
|
# Optional
|
|
|
|
# Default: "traefik"
|
|
|
|
#
|
|
|
|
# entryPoint = "traefik"
|
2015-09-14 13:38:58 +00:00
|
|
|
|
|
|
|
################################################################
|
|
|
|
# Docker configuration backend
|
|
|
|
################################################################
|
|
|
|
|
|
|
|
# Enable Docker configuration backend
|
2019-03-25 16:20:04 +00:00
|
|
|
[providers.docker]
|
2015-09-14 13:38:58 +00:00
|
|
|
|
2019-07-22 07:58:04 +00:00
|
|
|
# Docker server endpoint. Can be a tcp or a unix socket endpoint.
|
|
|
|
#
|
|
|
|
# Required
|
|
|
|
# Default: "unix:///var/run/docker.sock"
|
|
|
|
#
|
|
|
|
# endpoint = "tcp://10.10.10.10:2375"
|
2015-09-14 13:38:58 +00:00
|
|
|
|
2019-07-22 07:58:04 +00:00
|
|
|
# Default host rule.
|
|
|
|
#
|
|
|
|
# Optional
|
|
|
|
# Default: "Host(`{{ normalize .Name }}`)"
|
|
|
|
#
|
|
|
|
# defaultRule = "Host(`{{ normalize .Name }}.docker.localhost`)"
|
2016-08-05 14:02:46 +00:00
|
|
|
|
2019-07-22 07:58:04 +00:00
|
|
|
# Expose containers by default in traefik
|
|
|
|
#
|
|
|
|
# Optional
|
|
|
|
# Default: true
|
|
|
|
#
|
|
|
|
# exposedByDefault = false
|