Is there a way to give Traefik a set of defaults that would be used for a given provider or any router?
Right now I have this in my traefik.yml (there's more but this is what I think is relevant to my question):
# Entry Points configuration
# ---
entryPoints:
web:
address: :80
# (Optional) Redirect to HTTPS
# ---
http:
redirections:
entryPoint:
to: websecure
scheme: https
websecure:
address: :443
and every time I want to add a container to traefik I have to add this to my compose file(in this example, portainer):
labels:
traefik.http.routers.portainer.entrypoints: websecure
traefik.http.routers.portainer.rule: Host(`port.mydomain.tld`)
traefik.http.routers.portainer.tls: true
traefik.http.services.portainer.loadbalancer.server.port: 9000
of which only 2 of the lines are unique to this container.
Is there a way to have the
traefik.http.routers.portainer.entrypoints: websecure
traefik.http.routers.portainer.tls: true
part as default for every router either globally or every new router in the docker provider since I don't like having to add it to the labels of every single one of my containers with no change? This has already resulted in time wasted since I forgot to set tls:true on one container while still forcing the router down the https port.