mirror of
https://github.com/containous/traefik.git
synced 2024-12-22 13:34:03 +03:00
Improve documentation about API and Dashboard.
This commit is contained in:
parent
7357d5eae2
commit
887826ee68
@ -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
|
||||
|
@ -1,4 +0,0 @@
|
||||
{
|
||||
"extends": "../../.markdownlint.json",
|
||||
"MD041": false
|
||||
}
|
@ -1 +0,0 @@
|
||||
To learn more about configuration options in the command line, refer to the [configuration overview](../getting-started/configuration-overview.md)
|
@ -1 +0,0 @@
|
||||
To learn more about the configuration file, refer to [configuration overview](../getting-started/configuration-overview.md)
|
@ -1,2 +0,0 @@
|
||||
!!! info "More On Entry Points"
|
||||
Learn more about entry points and their configuration options in the dedicated section.
|
@ -1 +0,0 @@
|
||||
To learn more about configuration in key-value stores, refer to the [configuration overview](../getting-started/configuration-overview.md)
|
@ -1,2 +0,0 @@
|
||||
!!! info "More On Routers"
|
||||
Learn more about routers and their configuration options in the [dedicated section](../routing/routers/index.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)
|
||||
|
@ -28,7 +28,7 @@ spec:
|
||||
- name: traefik
|
||||
image: traefik:v2.0
|
||||
args:
|
||||
- --api
|
||||
- --api.insecure
|
||||
- --accesslog
|
||||
- --entrypoints.web.Address=:8000
|
||||
- --entrypoints.websecure.Address=:4443
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
@ -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}`:
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user