Yaml and consul config together

hi,

i would like to setup the API dashboard from the config.yaml, but its not working if I setup the consul as provider too. Is there any way to expose the API dashboard? I would like to reach anytime.

api:
  dashboard: true

experimental:
  http3: true

entryPoints:
    web:
      address: ":80"
      http:
        redirections:
          entryPoint:
            to: websecure
            scheme: https
    dashboard:
      address: "10.0.0.91:81"
    websecure:
      address: ":443"
      http3: {}

http:
  routers:
    dashboard:
      rule: Host(`10.0.0.91`)
      service: api@internal

providers:
  consulCatalog:
    endpoint:
      address: 10.0.0.91:8500

  consul:
    rootKey: "traefik"
    endpoints:
      - "http://10.0.0.91:8500"


certificatesresolvers:
    cf:
      acme:
        dnsChallenge:
            provider: cloudflare
        email: foo@foo.jp
        storage: /etc/traefik/acme.json

accessLog:
  filePath: "/var/log/traefik-access.log"

Your dashboard router needs to go into a dynamic config, not into static config.

Use provider.file to load a dynamic config file inside static config or use labels on container services.

You could also place it within consul, if you already use that provider.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.