nevermind, I found the issue by myself.. I need to address api@internal
and not dashboard@internal
. Now it works as expected with localhost/dashboard/
(mind the trailing slash)
---
providers:
file:
filename: /etc/traefik/traefik.yml
log:
level: debug
api:
dashboard: True
entryPoints:
web:
address: ":80"
http:
routers:
prometheus-router:
rule: "PathPrefix(`/prometheus`)"
service: prometheus
entryPoints:
- web
grafana-router:
rule: "PathPrefix(`/grafana`)"
service: grafana
entryPoints:
- web
api:
rule: "PathPrefix(`/api`) || PathPrefix(`/dashboard`)"
service: api@internal
entryPoints:
- web
services:
prometheus:
loadBalancer:
servers:
- url: "http://127.0.0.1:9090/"
grafana:
loadBalancer:
servers:
- url: "http://127.0.0.1:3000/"