doc: improve examples.
This commit is contained in:
parent
8b4ba3cb67
commit
75c99a0491
69 changed files with 1256 additions and 552 deletions
|
@ -29,12 +29,16 @@ would be to apply the following protection mechanisms:
|
|||
|
||||
To enable the API handler:
|
||||
|
||||
```toml tab="File"
|
||||
```toml tab="File (TOML)"
|
||||
[api]
|
||||
```
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
api: {}
|
||||
```
|
||||
|
||||
```bash tab="CLI"
|
||||
--api
|
||||
--api=true
|
||||
```
|
||||
|
||||
### `dashboard`
|
||||
|
@ -43,13 +47,18 @@ _Optional, Default=true_
|
|||
|
||||
Enable the dashboard. More about the dashboard features [here](./dashboard.md).
|
||||
|
||||
```toml tab="File"
|
||||
```toml tab="File (TOML)"
|
||||
[api]
|
||||
dashboard = true
|
||||
```
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
api:
|
||||
dashboard: true
|
||||
```
|
||||
|
||||
```bash tab="CLI"
|
||||
--api.dashboard
|
||||
--api.dashboard=true
|
||||
```
|
||||
|
||||
### `debug`
|
||||
|
@ -58,11 +67,16 @@ _Optional, Default=false_
|
|||
|
||||
Enable additional endpoints for debugging and profiling, served under `/debug/`.
|
||||
|
||||
```toml tab="File"
|
||||
```toml tab="File (TOML)"
|
||||
[api]
|
||||
debug = true
|
||||
```
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
api:
|
||||
debug: true
|
||||
```
|
||||
|
||||
```bash tab="CLI"
|
||||
--api.debug=true
|
||||
```
|
||||
|
|
|
@ -29,38 +29,39 @@ By default, the dashboard is available on `/` on port `:8080`.
|
|||
|
||||
To enable the dashboard, you need to enable Traefik's API.
|
||||
|
||||
??? example "Using the Command Line"
|
||||
```toml tab="File (TOML)"
|
||||
[api]
|
||||
# Dashboard
|
||||
#
|
||||
# Optional
|
||||
# Default: true
|
||||
#
|
||||
dashboard = true
|
||||
```
|
||||
|
||||
| Option | Values | Default Value |
|
||||
| --------------- | --------------- | --------------------: |
|
||||
| --api | \[true\|false\] | false |
|
||||
| --api.dashboard | \[true\|false\] | true when api is true |
|
||||
|
||||
{!more-on-command-line.md!}
|
||||
```yaml tab="File (YAML)"
|
||||
api:
|
||||
# Dashboard
|
||||
#
|
||||
# Optional
|
||||
# Default: true
|
||||
#
|
||||
dashboard: true
|
||||
```
|
||||
|
||||
??? example "Using the Configuration File"
|
||||
```bash tab="CLI"
|
||||
# Dashboard
|
||||
#
|
||||
# Optional
|
||||
# Default: true
|
||||
#
|
||||
--api.dashboard=true
|
||||
```
|
||||
|
||||
```toml
|
||||
[api]
|
||||
# Dashboard
|
||||
#
|
||||
# Optional
|
||||
# Default: true
|
||||
#
|
||||
dashboard = true
|
||||
```
|
||||
|
||||
{!more-on-configuration-file.md!}
|
||||
{!more-on-command-line.md!}
|
||||
|
||||
??? example "Using a Key/Value Store"
|
||||
{!more-on-configuration-file.md!}
|
||||
|
||||
| Key | Values | Default Value |
|
||||
| ------------- | --------------- | --------------------: |
|
||||
| api | \[true\|false\] | false |
|
||||
| api.dashboard | \[true\|false\] | true when api is true |
|
||||
|
||||
{!more-on-key-value-store.md!}
|
||||
|
||||
!!! tip "Did You Know?"
|
||||
The API provides more features than the Dashboard.
|
||||
To learn more about it, refer to the `Traefik's API documentation`(TODO: add doc and link).
|
||||
|
|
|
@ -7,9 +7,17 @@ Checking the Health of Your Traefik Instances
|
|||
|
||||
??? example "Enabling /ping"
|
||||
|
||||
```toml
|
||||
[ping]
|
||||
```
|
||||
```toml tab="File (TOML)"
|
||||
[ping]
|
||||
```
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
ping: {}
|
||||
```
|
||||
|
||||
```bash tab="CLI"
|
||||
--ping=true
|
||||
```
|
||||
|
||||
| Path | Method | Description |
|
||||
|---------|---------------|-----------------------------------------------------------------------------------------------------|
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue