According to the documentation, it's not possible to use both a (static) configuration file as well as environment variables alongside each other (same goes for command line arguments).
I think I'm not the only one if I say that I want the majority of my configuration in a file and put more important information (e.g. secrets) in environment variables.
Example:
Having a static configuration, without acme email address.
api:
dashboard: false
log:
level: INFO
entryPoints:
web:
address: :80
http:
redirections:
entryPoint:
to: websecure
websecure:
address: :443
forwardedHeaders:
trustedIPs:
- "172.17.0.0/16"
- "173.245.48.0/20"
- "103.21.244.0/22"
- "103.22.200.0/22"
- "103.31.4.0/22"
- "141.101.64.0/18"
- "108.162.192.0/18"
- "190.93.240.0/20"
- "188.114.96.0/20"
- "197.234.240.0/22"
- "198.41.128.0/17"
- "162.158.0.0/15"
- "104.16.0.0/13"
- "104.24.0.0/14"
- "172.64.0.0/13"
- "131.0.72.0/22"
- "2400:cb00::/32"
- "2606:4700::/32"
- "2803:f800::/32"
- "2405:b500::/32"
- "2405:8100::/32"
- "2a06:98c0::/29"
- "2c0f:f248::/32"
providers:
docker:
endpoint: "unix:///var/run/docker.sock"
exposedByDefault: false
watch: true
network: proxy
file:
directory: /dynamic
certificatesResolvers:
myresolver:
acme:
storage: /certs/acme.json
dnsChallenge:
provider: cloudflare
delayBeforeCheck: 15
resolvers:
- "1.1.1.1:53"
- "1.0.0.1:53"
And provide the email separately through environment variable:
TRAEFIK_CERTIFICATESRESOLVERS_MYRESOLVER_ACME_EMAIL="admin@example.com"
So while it's not possible, my question is why? Why is it mutually exclusive? What's the (design/techincal) reason behind this decision? And will it ever be possible to use them interwined?