Improve documentation about API and Dashboard.

This commit is contained in:
Ludovic Fernandez 2019-09-12 16:22:03 +02:00 committed by Traefiker Bot
parent 7357d5eae2
commit 887826ee68
17 changed files with 27 additions and 36 deletions

View file

@ -17,11 +17,11 @@ services:
# The official v2.0 Traefik docker image # The official v2.0 Traefik docker image
image: traefik:v2.0 image: traefik:v2.0
# Enables the web UI and tells Traefik to listen to docker # Enables the web UI and tells Traefik to listen to docker
command: --api --providers.docker command: --api.insecure=true --providers.docker
ports: ports:
# The HTTP port # The HTTP port
- "80:80" - "80:80"
# The Web UI (enabled by --api) # The Web UI (enabled by --api.insecure=true)
- "8080:8080" - "8080:8080"
volumes: volumes:
# So that Traefik can listen to the Docker events # So that Traefik can listen to the Docker events

View file

@ -1,4 +0,0 @@
{
"extends": "../../.markdownlint.json",
"MD041": false
}

View file

@ -1 +0,0 @@
To learn more about configuration options in the command line, refer to the [configuration overview](../getting-started/configuration-overview.md)

View file

@ -1 +0,0 @@
To learn more about the configuration file, refer to [configuration overview](../getting-started/configuration-overview.md)

View file

@ -1,2 +0,0 @@
!!! info "More On Entry Points"
Learn more about entry points and their configuration options in the dedicated section.

View file

@ -1 +0,0 @@
To learn more about configuration in key-value stores, refer to the [configuration overview](../getting-started/configuration-overview.md)

View file

@ -1,2 +0,0 @@
!!! info "More On Routers"
Learn more about routers and their configuration options in the [dedicated section](../routing/routers/index.md).

View file

@ -12,13 +12,13 @@ The dashboard is the central place that shows you the current active routes hand
By default, the dashboard is available on `/` on port `:8080`. By default, the dashboard is available on `/` on port `:8080`.
!!! tip "Did You Know?" !!! note "Did You Know?"
It is possible to customize the dashboard endpoint. It is possible to customize the dashboard endpoint.
To learn how, refer to the [API documentation](./api.md) To learn how, refer to the [API documentation](./api.md)
## Enabling the Dashboard ## Enabling the Dashboard
To enable the dashboard, you need to enable Traefik's API. To enable the dashboard, you need to enable [Traefik's API](./api.md).
```toml tab="File (TOML)" ```toml tab="File (TOML)"
[api] [api]
@ -49,10 +49,12 @@ api:
--api.dashboard=true --api.dashboard=true
``` ```
{!more-on-command-line.md!} !!! important "API/Dashboard Security"
To secure your dashboard, the use of a `service` named `api@internal` is mandatory and requires the definition of a router using one or more security [middlewares](../middlewares/overview.md)
like authentication ([basicAuth](../middlewares/basicauth.md) , [digestAuth](../middlewares/digestauth.md), [forwardAuth](../middlewares/forwardauth.md)) or [whitelisting](../middlewares/ipwhitelist.md).
More information about `api@internal` can be found in the [API documentation](./api.md#configuration)
{!more-on-configuration-file.md!} !!! note "Did You Know?"
!!! tip "Did You Know?"
The API provides more features than the Dashboard. The API provides more features than the Dashboard.
To learn more about it, refer to the [API documentation](./api.md) To learn more about it, refer to the [API documentation](./api.md)

View file

@ -28,7 +28,7 @@ spec:
- name: traefik - name: traefik
image: traefik:v2.0 image: traefik:v2.0
args: args:
- --api - --api.insecure
- --accesslog - --accesslog
- --entrypoints.web.Address=:8000 - --entrypoints.web.Address=:8000
- --entrypoints.websecure.Address=:4443 - --entrypoints.websecure.Address=:4443

View file

@ -3,11 +3,11 @@ version: "3.3"
services: services:
traefik: traefik:
image: "traefik:v2.0.0-beta1" image: "traefik:v2.0.0-rc3"
container_name: "traefik" container_name: "traefik"
command: command:
#- "--log.level=DEBUG" #- "--log.level=DEBUG"
- "--api=true" - "--api.insecure=true"
- "--providers.docker=true" - "--providers.docker=true"
- "--providers.docker.exposedbydefault=false" - "--providers.docker.exposedbydefault=false"
- "--entrypoints.web.address=:80" - "--entrypoints.web.address=:80"

View file

@ -13,11 +13,11 @@ secrets:
services: services:
traefik: traefik:
image: "traefik:v2.0.0-beta1" image: "traefik:v2.0.0-rc3"
container_name: "traefik" container_name: "traefik"
command: command:
#- "--log.level=DEBUG" #- "--log.level=DEBUG"
- "--api=true" - "--api.insecure=true"
- "--providers.docker=true" - "--providers.docker=true"
- "--providers.docker.exposedbydefault=false" - "--providers.docker.exposedbydefault=false"
- "--entrypoints.web.address=:80" - "--entrypoints.web.address=:80"

View file

@ -3,11 +3,11 @@ version: "3.3"
services: services:
traefik: traefik:
image: "traefik:v2.0.0-beta1" image: "traefik:v2.0.0-rc3"
container_name: "traefik" container_name: "traefik"
command: command:
#- "--log.level=DEBUG" #- "--log.level=DEBUG"
- "--api=true" - "--api.insecure=true"
- "--providers.docker=true" - "--providers.docker=true"
- "--providers.docker.exposedbydefault=false" - "--providers.docker.exposedbydefault=false"
- "--entrypoints.web.address=:80" - "--entrypoints.web.address=:80"

View file

@ -3,11 +3,11 @@ version: "3.3"
services: services:
traefik: traefik:
image: "traefik:v2.0.0-beta1" image: "traefik:v2.0.0-rc3"
container_name: "traefik" container_name: "traefik"
command: command:
#- "--log.level=DEBUG" #- "--log.level=DEBUG"
- "--api=true" - "--api.insecure=true"
- "--providers.docker=true" - "--providers.docker=true"
- "--providers.docker.exposedbydefault=false" - "--providers.docker.exposedbydefault=false"
- "--entrypoints.websecure.address=:443" - "--entrypoints.websecure.address=:443"

View file

@ -3,11 +3,11 @@ version: "3.3"
services: services:
traefik: traefik:
image: "traefik:v2.0.0-beta1" image: "traefik:v2.0.0-rc3"
container_name: "traefik" container_name: "traefik"
command: command:
#- "--log.level=DEBUG" #- "--log.level=DEBUG"
- "--api=true" - "--api.insecure=true"
- "--providers.docker=true" - "--providers.docker=true"
- "--providers.docker.exposedbydefault=false" - "--providers.docker.exposedbydefault=false"
- "--entrypoints.web.address=:80" - "--entrypoints.web.address=:80"

View file

@ -53,7 +53,7 @@ ports:
```yaml ```yaml
command: command:
# Traefik will listen on port 8080 by default for API request. # Traefik will listen on port 8080 by default for API request.
- "--api=true" - "--api.insecure=true"
ports: ports:
- "8080:8080" - "8080:8080"

View file

@ -34,7 +34,7 @@ api: {}
```yaml tab="CLI" ```yaml tab="CLI"
--entryPoints.web.address=":80" --entryPoints.web.address=":80"
--providers.file.filename=dynamic_conf.toml --providers.file.filename=dynamic_conf.toml
--api=true --api.insecure=true
``` ```
`dynamic_conf.{toml,yml}`: `dynamic_conf.{toml,yml}`:
@ -157,7 +157,7 @@ api: {}
# For secure connection on backend.local # For secure connection on backend.local
--serversTransport.rootCAs=./backend.cert --serversTransport.rootCAs=./backend.cert
--providers.file.filename=dynamic_conf.toml --providers.file.filename=dynamic_conf.toml
--api=true --api.insecure=true
``` ```
`dynamic_conf.{toml,yml}`: `dynamic_conf.{toml,yml}`:

View file

@ -58,9 +58,9 @@ markdown_extensions:
- pymdownx.tasklist - pymdownx.tasklist
- pymdownx.snippets: - pymdownx.snippets:
check_paths: true check_paths: true
- markdown_include.include: # - markdown_include.include:
base_path: content/includes/ # base_path: content/includes/
encoding: utf-8 # encoding: utf-8
- toc: - toc:
permalink: true permalink: true