Skip to content

Commit

Permalink
doc: add YAML sample.
Browse files Browse the repository at this point in the history
  • Loading branch information
ldez authored Oct 8, 2020
1 parent 4953445 commit 63683d3
Show file tree
Hide file tree
Showing 2 changed files with 155 additions and 1 deletion.
5 changes: 4 additions & 1 deletion docs/content/getting-started/install-traefik.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ You can install Traefik with the following flavors:

## Use the Official Docker Image

Choose one of the [official Docker images](https://hub.docker.com/_/traefik) and run it with the [sample configuration file](https://raw.githubusercontent.com/traefik/traefik/v2.3/traefik.sample.toml):
Choose one of the [official Docker images](https://hub.docker.com/_/traefik) and run it with one sample configuration file:

* [TOML](https://raw.githubusercontent.com/traefik/traefik/v2.3/traefik.sample.toml)
* [YAML](https://raw.githubusercontent.com/traefik/traefik/v2.3/traefik.sample.yml)

```bash
docker run -d -p 8080:8080 -p 80:80 \
Expand Down
151 changes: 151 additions & 0 deletions traefik.sample.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
################################################################
#
# Configuration sample for Traefik v2.
#
# For Traefik v1: https://github.com/traefik/traefik/blob/v1.7/traefik.sample.toml
#
################################################################

################################################################
# Global configuration
################################################################
global:
checkNewVersion: true
sendAnonymousUsage: true

################################################################
# EntryPoints configuration
################################################################

# EntryPoints definition
#
# Optional
#
entryPoints:
web:
address: :80

websecure:
address: :443

################################################################
# Traefik logs configuration
################################################################

# Traefik logs
# Enabled by default and log to stdout
#
# Optional
#
#log:
# Log level
#
# Optional
# Default: "ERROR"
#
# level: DEBUG

# 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

# Format is either "json" or "common".
#
# Optional
# Default: "common"
#
# format: json

################################################################
# Access logs configuration
################################################################

# Enable access logs
# By default it will write to stdout and produce logs in the textual
# Common Log Format (CLF), extended with additional fields.
#
# Optional
#
#accessLog:
# 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

# Format is either "json" or "common".
#
# Optional
# Default: "common"
#
# format: json

################################################################
# API and dashboard configuration
################################################################

# Enable API and dashboard
#
# Optional
#
#api:
# Enable the API in insecure mode
#
# Optional
# Default: false
#
# insecure: true

# Enabled Dashboard
#
# Optional
# Default: true
#
# dashboard: false

################################################################
# Ping configuration
################################################################

# Enable ping
#ping:
# Name of the related entry point
#
# Optional
# Default: "traefik"
#
# entryPoint: traefik

################################################################
# Docker configuration backend
################################################################

#providers:
# Enable Docker configuration backend
# docker:
# 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

# Default host rule.
#
# Optional
# Default: "Host(`{{ normalize .Name }}`)"
#
# defaultRule: Host(`{{ normalize .Name }}.docker.localhost`)

# Expose containers by default in traefik
#
# Optional
# Default: true
#
# exposedByDefault: false

0 comments on commit 63683d3

Please sign in to comment.