How to redirect to the dashboard from a URL?

so you have to set traefik.enable=true on your container.

version: "3"

services:
  traefik:
    container_name: traefik
    image: traefik
    ports:
      - 80:80
      - 443:443
    restart: unless-stopped
    volumes:
      - /etc/docker/container-data/traefik:/etc/traefik
      - /var/run/docker.sock:/var/run/docker.sock
      - /etc/localtime:/etc/localtime:ro
    labels:
      - traefik.enable=true
      - traefik.http.routers.api.rule=Host(`traefik.mydomain.org`)
      - traefik.http.routers.api.service=api@internal
      - traefik.http.routers.api.middlewares=lan
      - traefik.http.middlewares.lan.ipwhitelist.sourcerange=192.168.10.0/24, 192.168.20.0/24
1 Like