Allow file provider to load config from files in a directory.
This commit is contained in:
parent
73e10c96cc
commit
4128c1ac8d
8 changed files with 442 additions and 45 deletions
10
docs/toml.md
10
docs/toml.md
|
@ -445,7 +445,7 @@ entryPoint = "https"
|
|||
|
||||
## File backend
|
||||
|
||||
Like any other reverse proxy, Træfik can be configured with a file. You have two choices:
|
||||
Like any other reverse proxy, Træfik can be configured with a file. You have three choices:
|
||||
|
||||
- simply add your configuration at the end of the global configuration file `traefik.toml`:
|
||||
|
||||
|
@ -586,6 +586,13 @@ filename = "rules.toml"
|
|||
rule = "Path:/test"
|
||||
```
|
||||
|
||||
- or you could have multiple .toml files in a directory:
|
||||
|
||||
```toml
|
||||
[file]
|
||||
directory = "/path/to/config/"
|
||||
```
|
||||
|
||||
If you want Træfik to watch file changes automatically, just add:
|
||||
|
||||
```toml
|
||||
|
@ -593,6 +600,7 @@ If you want Træfik to watch file changes automatically, just add:
|
|||
watch = true
|
||||
```
|
||||
|
||||
|
||||
## API backend
|
||||
|
||||
Træfik can be configured using a RESTful api.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue