From 887826ee68f8875d1453a3a725b4bdd1e5874842 Mon Sep 17 00:00:00 2001 From: Ludovic Fernandez Date: Thu, 12 Sep 2019 16:22:03 +0200 Subject: [PATCH] Improve documentation about API and Dashboard. --- docs/content/getting-started/quick-start.md | 4 ++-- docs/content/includes/.markdownlint.json | 4 ---- docs/content/includes/more-on-command-line.md | 1 - .../content/includes/more-on-configuration-file.md | 1 - docs/content/includes/more-on-entrypoints.md | 2 -- docs/content/includes/more-on-key-value-store.md | 1 - docs/content/includes/more-on-routers.md | 2 -- docs/content/operations/dashboard.md | 14 ++++++++------ .../user-guides/crd-acme/03-deployments.yml | 2 +- .../docker-compose/acme-dns/docker-compose.yml | 4 ++-- .../acme-dns/docker-compose_secrets.yml | 4 ++-- .../docker-compose/acme-http/docker-compose.yml | 4 ++-- .../docker-compose/acme-tls/docker-compose.yml | 4 ++-- .../basic-example/docker-compose.yml | 4 ++-- .../docker-compose/basic-example/index.md | 2 +- docs/content/user-guides/grpc.md | 4 ++-- docs/mkdocs.yml | 6 +++--- 17 files changed, 27 insertions(+), 36 deletions(-) delete mode 100644 docs/content/includes/.markdownlint.json delete mode 100644 docs/content/includes/more-on-command-line.md delete mode 100644 docs/content/includes/more-on-configuration-file.md delete mode 100644 docs/content/includes/more-on-entrypoints.md delete mode 100644 docs/content/includes/more-on-key-value-store.md delete mode 100644 docs/content/includes/more-on-routers.md diff --git a/docs/content/getting-started/quick-start.md b/docs/content/getting-started/quick-start.md index abe74af88..e629763ec 100644 --- a/docs/content/getting-started/quick-start.md +++ b/docs/content/getting-started/quick-start.md @@ -17,11 +17,11 @@ services: # The official v2.0 Traefik docker image image: traefik:v2.0 # Enables the web UI and tells Traefik to listen to docker - command: --api --providers.docker + command: --api.insecure=true --providers.docker ports: # The HTTP port - "80:80" - # The Web UI (enabled by --api) + # The Web UI (enabled by --api.insecure=true) - "8080:8080" volumes: # So that Traefik can listen to the Docker events diff --git a/docs/content/includes/.markdownlint.json b/docs/content/includes/.markdownlint.json deleted file mode 100644 index 3ad8a7f24..000000000 --- a/docs/content/includes/.markdownlint.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": "../../.markdownlint.json", - "MD041": false -} diff --git a/docs/content/includes/more-on-command-line.md b/docs/content/includes/more-on-command-line.md deleted file mode 100644 index c7ee03498..000000000 --- a/docs/content/includes/more-on-command-line.md +++ /dev/null @@ -1 +0,0 @@ -To learn more about configuration options in the command line, refer to the [configuration overview](../getting-started/configuration-overview.md) diff --git a/docs/content/includes/more-on-configuration-file.md b/docs/content/includes/more-on-configuration-file.md deleted file mode 100644 index 746c1608b..000000000 --- a/docs/content/includes/more-on-configuration-file.md +++ /dev/null @@ -1 +0,0 @@ -To learn more about the configuration file, refer to [configuration overview](../getting-started/configuration-overview.md) diff --git a/docs/content/includes/more-on-entrypoints.md b/docs/content/includes/more-on-entrypoints.md deleted file mode 100644 index 593b78ce8..000000000 --- a/docs/content/includes/more-on-entrypoints.md +++ /dev/null @@ -1,2 +0,0 @@ -!!! info "More On Entry Points" - Learn more about entry points and their configuration options in the dedicated section. \ No newline at end of file diff --git a/docs/content/includes/more-on-key-value-store.md b/docs/content/includes/more-on-key-value-store.md deleted file mode 100644 index 714952afc..000000000 --- a/docs/content/includes/more-on-key-value-store.md +++ /dev/null @@ -1 +0,0 @@ -To learn more about configuration in key-value stores, refer to the [configuration overview](../getting-started/configuration-overview.md) diff --git a/docs/content/includes/more-on-routers.md b/docs/content/includes/more-on-routers.md deleted file mode 100644 index 65bf7fbad..000000000 --- a/docs/content/includes/more-on-routers.md +++ /dev/null @@ -1,2 +0,0 @@ -!!! info "More On Routers" - Learn more about routers and their configuration options in the [dedicated section](../routing/routers/index.md). diff --git a/docs/content/operations/dashboard.md b/docs/content/operations/dashboard.md index a73a52ee2..d22356608 100644 --- a/docs/content/operations/dashboard.md +++ b/docs/content/operations/dashboard.md @@ -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`. -!!! tip "Did You Know?" +!!! note "Did You Know?" It is possible to customize the dashboard endpoint. To learn how, refer to the [API documentation](./api.md) ## 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)" [api] @@ -49,10 +49,12 @@ api: --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!} - -!!! tip "Did You Know?" +!!! note "Did You Know?" The API provides more features than the Dashboard. To learn more about it, refer to the [API documentation](./api.md) diff --git a/docs/content/user-guides/crd-acme/03-deployments.yml b/docs/content/user-guides/crd-acme/03-deployments.yml index 71780e9ce..1d1f98c3a 100644 --- a/docs/content/user-guides/crd-acme/03-deployments.yml +++ b/docs/content/user-guides/crd-acme/03-deployments.yml @@ -28,7 +28,7 @@ spec: - name: traefik image: traefik:v2.0 args: - - --api + - --api.insecure - --accesslog - --entrypoints.web.Address=:8000 - --entrypoints.websecure.Address=:4443 diff --git a/docs/content/user-guides/docker-compose/acme-dns/docker-compose.yml b/docs/content/user-guides/docker-compose/acme-dns/docker-compose.yml index bfba9fe4c..14cf5c435 100644 --- a/docs/content/user-guides/docker-compose/acme-dns/docker-compose.yml +++ b/docs/content/user-guides/docker-compose/acme-dns/docker-compose.yml @@ -3,11 +3,11 @@ version: "3.3" services: traefik: - image: "traefik:v2.0.0-beta1" + image: "traefik:v2.0.0-rc3" container_name: "traefik" command: #- "--log.level=DEBUG" - - "--api=true" + - "--api.insecure=true" - "--providers.docker=true" - "--providers.docker.exposedbydefault=false" - "--entrypoints.web.address=:80" diff --git a/docs/content/user-guides/docker-compose/acme-dns/docker-compose_secrets.yml b/docs/content/user-guides/docker-compose/acme-dns/docker-compose_secrets.yml index 7f41f26de..03d00179d 100644 --- a/docs/content/user-guides/docker-compose/acme-dns/docker-compose_secrets.yml +++ b/docs/content/user-guides/docker-compose/acme-dns/docker-compose_secrets.yml @@ -13,11 +13,11 @@ secrets: services: traefik: - image: "traefik:v2.0.0-beta1" + image: "traefik:v2.0.0-rc3" container_name: "traefik" command: #- "--log.level=DEBUG" - - "--api=true" + - "--api.insecure=true" - "--providers.docker=true" - "--providers.docker.exposedbydefault=false" - "--entrypoints.web.address=:80" diff --git a/docs/content/user-guides/docker-compose/acme-http/docker-compose.yml b/docs/content/user-guides/docker-compose/acme-http/docker-compose.yml index 8f348a7a8..b63906d55 100644 --- a/docs/content/user-guides/docker-compose/acme-http/docker-compose.yml +++ b/docs/content/user-guides/docker-compose/acme-http/docker-compose.yml @@ -3,11 +3,11 @@ version: "3.3" services: traefik: - image: "traefik:v2.0.0-beta1" + image: "traefik:v2.0.0-rc3" container_name: "traefik" command: #- "--log.level=DEBUG" - - "--api=true" + - "--api.insecure=true" - "--providers.docker=true" - "--providers.docker.exposedbydefault=false" - "--entrypoints.web.address=:80" diff --git a/docs/content/user-guides/docker-compose/acme-tls/docker-compose.yml b/docs/content/user-guides/docker-compose/acme-tls/docker-compose.yml index 1b03ce8d3..fe1ae9f1f 100644 --- a/docs/content/user-guides/docker-compose/acme-tls/docker-compose.yml +++ b/docs/content/user-guides/docker-compose/acme-tls/docker-compose.yml @@ -3,11 +3,11 @@ version: "3.3" services: traefik: - image: "traefik:v2.0.0-beta1" + image: "traefik:v2.0.0-rc3" container_name: "traefik" command: #- "--log.level=DEBUG" - - "--api=true" + - "--api.insecure=true" - "--providers.docker=true" - "--providers.docker.exposedbydefault=false" - "--entrypoints.websecure.address=:443" diff --git a/docs/content/user-guides/docker-compose/basic-example/docker-compose.yml b/docs/content/user-guides/docker-compose/basic-example/docker-compose.yml index 5fb8bf9dd..327ab5b67 100644 --- a/docs/content/user-guides/docker-compose/basic-example/docker-compose.yml +++ b/docs/content/user-guides/docker-compose/basic-example/docker-compose.yml @@ -3,11 +3,11 @@ version: "3.3" services: traefik: - image: "traefik:v2.0.0-beta1" + image: "traefik:v2.0.0-rc3" container_name: "traefik" command: #- "--log.level=DEBUG" - - "--api=true" + - "--api.insecure=true" - "--providers.docker=true" - "--providers.docker.exposedbydefault=false" - "--entrypoints.web.address=:80" diff --git a/docs/content/user-guides/docker-compose/basic-example/index.md b/docs/content/user-guides/docker-compose/basic-example/index.md index 85d8fb495..55f9062aa 100644 --- a/docs/content/user-guides/docker-compose/basic-example/index.md +++ b/docs/content/user-guides/docker-compose/basic-example/index.md @@ -53,7 +53,7 @@ ports: ```yaml command: # Traefik will listen on port 8080 by default for API request. - - "--api=true" + - "--api.insecure=true" ports: - "8080:8080" diff --git a/docs/content/user-guides/grpc.md b/docs/content/user-guides/grpc.md index 6748445df..bbc70673f 100644 --- a/docs/content/user-guides/grpc.md +++ b/docs/content/user-guides/grpc.md @@ -34,7 +34,7 @@ api: {} ```yaml tab="CLI" --entryPoints.web.address=":80" --providers.file.filename=dynamic_conf.toml ---api=true +--api.insecure=true ``` `dynamic_conf.{toml,yml}`: @@ -157,7 +157,7 @@ api: {} # For secure connection on backend.local --serversTransport.rootCAs=./backend.cert --providers.file.filename=dynamic_conf.toml ---api=true +--api.insecure=true ``` `dynamic_conf.{toml,yml}`: diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml index b7f09c0e1..6af5e4126 100644 --- a/docs/mkdocs.yml +++ b/docs/mkdocs.yml @@ -58,9 +58,9 @@ markdown_extensions: - pymdownx.tasklist - pymdownx.snippets: check_paths: true - - markdown_include.include: - base_path: content/includes/ - encoding: utf-8 +# - markdown_include.include: +# base_path: content/includes/ +# encoding: utf-8 - toc: permalink: true