0x0011 - Traefik example configuration w/ api Dashboard Enabled

0x0011 - Traefik example configuration w/ api Dashboard Enabled

An example configuration - before you use it create a docker network:

docker create network proxy
version: "3.3"

services:
  traefik:
    image: "traefik"
    container_name: "traefik"
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.traefik.rule=Host(`www.somewhere.com`)"
      - "traefik.http.routers.traefik.entrypoints=web"
      - "traefik.http.routers.traefik.service=api@internal"
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - "/var/run/docker.sock:/var/run/docker.sock:ro"
      - "./:/etc/traefik"
      - "/docker/traefik/traefik.log:/docker/traefik/traefik.log"
      - "/docker/traefik/traefik_access.log:/docker/traefik/traefik_access.log"
    networks:
      - proxy

Note - You MUST:

 - "traefik.http.routers.traefik.service=api@internal"
Linux Rocks Every Day