docker

To be able to reach the DrayTec Vigor 165 admin page from other vlans I added a route to traefik.

This is my /etc/environment file

PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games"
PUID=1001
PGID=1001
TZ="Europe/Zurich"
DOMAINNAME="apu07.home"
DNS=10.51.0.254

This is my docker-compose.yml file

version: '3.7'
  
services:
  traefik:
    container_name: traefik
    domainname: ${DOMAINNAME}
    image: traefik
    restart: unless-stopped
    command:
      - --api.insecure=true
      - --providers.docker
      - --providers.docker.exposedbydefault=false
      - --entrypoints.web.address=:80
      - --providers.file.directory=/rules
      - --providers.file.watch=true
      #- --providers.docker.defaultRule="Host(`${DOMAINNAME}`)"
    ports:
      - "80:80"
      - "443:443"
      - "8080:8080"
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - ./traefik/rules:/rules
    networks:
      - default
      - discovery
    dns:
      - ${DNS}

networks:
  discovery:

And I have traefik rules in a traefik/rules/vigor.toml file for the DrayTec Vigor 165

[http.routers]
  [http.routers.vigor-rtr]
      entryPoints = ["web"]
      rule = "Host(`vigor.apu07.home`)"
      service = "vigor-svc"

[http.services]
  [http.services.vigor-svc]
    [http.services.vigor-svc.loadBalancer]
      passHostHeader = true
      [[http.services.vigor-svc.loadBalancer.servers]]
        url = "http://10.51.0.1:80" 

Revision #4
Created Wed, Apr 22, 2020 1:54 PM by Bodo
Updated Tue, May 5, 2020 5:37 AM by Bodo