Allow file provider to load config from files in a directory.

This commit is contained in:
Richard Shepherd 2017-05-26 14:32:03 +01:00 committed by Ludovic Fernandez
parent 73e10c96cc
commit 4128c1ac8d
8 changed files with 442 additions and 45 deletions

View file

@ -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.