Split the configuration into files
providers.file.paths since v0.2 adds the objects of more files to rdock.yaml: one file per site or team, generated files next to hand-written ones, and so on.
The main file
Section titled “The main file”listeners: web: { address: ":80" }
defaults: listeners: [web] tls: off
providers: file: paths: ["conf.d/*.yaml"]
middlewares: secure-headers: type: headers response: set: X-Content-Type-Options: nosniffA site’s file
Section titled “A site’s file”routes: blog: match: "Host(`blog.example.com`)" service: blog middlewares: [secure-headers]
services: blog: backends: [{ address: "blog:2368" }]- A path is a file or a pattern;
*and?may appear in the file name, not in directories. Relative paths start at the main file’s directory. - Extra files may hold
routes,services,middlewares,tcp_routes,tcp_servicesandcertificates. Listeners, defaults and every other setting stay in the main file. - All files form one configuration: objects refer to each other by name across files, as
secure-headersabove. - A name defined in two files is an error that names both files, and the whole configuration is refused; the previous one keeps serving.
- A missing file named exactly is an error. A pattern that matches nothing is not, so
conf.d/can start empty. - Files whose names start with
.match only patterns that start with., so editors’ temporary files are skipped. - Changes are applied like changes to the main file: on save, with
SIGHUPorrdock reload. A file added to or removed from a pattern’s directory counts as a change, even when the directory is created after ReverseDock starts.providers.file.watch: falseturns watching off. rdock validate rdock.yamlreads the extra files too.