Environment variables in Traefik

I was hoping to be able to use environment variables in the file provider.

    entrypoints = https
    rule = Host(`rtr.$DOMAINNAME`)

Is there a way to make that work in a pure traefik way ? I do not want to use other software to modify text files etc.

For now I had to resort to docker-compose but I find the file provider much cleaner.

You can use templating for this. Have a search in the forum, pretty sure there has been a thread/example previously. If you don't find it I might post tomorrow.