traefik: Remove file provider config options when omitted

Currently there is an ugly error message when traefik tries to read the
dynamic_conf directory while it doesn't exists, because no dynamic
config is definied. This patch makes the config, given that it's not
defined truely optional and gets rid of the error message.
This commit is contained in:
Sheogorath 2020-08-20 23:31:07 +02:00 committed by saibotk
parent a2b76ad7b0
commit 4a5c245128
No known key found for this signature in database
GPG key ID: A3299C587D5DF523

View file

@ -105,8 +105,10 @@ services:
- "--entryPoints.web.address=:80"
- "--entryPoints.websecure.address=:443"
- "--accesslog={{ traefik_access_log_enabled | bool | lower }}"
{% if traefik_dynamic_conf != omit %}
- "--providers.file.directory=/etc/traefik/dynamic_conf"
- "--providers.file.watch=true"
{% endif %}
- "--providers.docker=true"
- "--providers.docker.endpoint=tcp://dockersocket:2375"
- "--providers.docker.exposedByDefault=false"