I successfully configured the api/dashboard in docker-compose.yml
.
However, due to my other issue I want to move that config to a separate dynamic config file.
This is what I did:
docker-compose.yml
:
services:
traefik:
# ...
volumes:
- ./config/:/etc/traefik/config/:ro
command:
- --providers.file.directory=/etc/traefik/config/
- --providers.file.watch=true
- --api=true
# ...
./config/api.yml
:
http:
routers:
dashboard:
entrypoints:
- websecure
rule: Host(`dashboard.example.com`) && PathPrefix(`/api`, `/dashboard`, `/debug`)
middlewares:
- auth
service: api@internal
middlewares:
auth:
basicAuth:
usersfile: /run/secrets/api
./config/tls.yml
:
# this dynamic config files works!
./config/other.yml
:
# this dynamic config files works!
Traefik starts without errors in the logs. But when I visit https://dashboard.example.com/dashboard/
I get a 404.
All examples I've seen configure the dashboard in docker-compose.yml
. Is it actually possible to do it in a separate dynamic config file?
If yes, the issue is probably config - can you spot my error?
Thanks.