I run traefik inside docker. I want to load dynamic configuration (for middleware) from a file provider.
However, I get this error message when starting the container:
command traefik error: field not found, node: http
# docker-compose.yml
volumes:
- ${STACK_FOLDER}/letsencrypt:/letsencrypt
- ${STACK_FOLDER}/traefik.yml:/traefik.yml:ro
- ${STACK_FOLDER}/config.yml:/config/config.yml:ro
# config.yml
http:
middlewares:
to-https:
redirectScheme:
scheme: https
permanent: true
# traefik.yml
providers:
docker:
endpoint: "unix:///var/run/docker.sock"
exposedByDefault: false
swarmMode: true
network: traefik
watch: true
file:
directory: /config
watch: true