3

I have Traefik configured just fine with two docker networks. I need has come up recently that I need a third network to configure to proxy traffic to another network. I am trying to add the lan network to the traefik container to proxy request to another network other than t1_proxy.

version: "3"
services:
  traefik:
    hostname: traefik
    image: traefik:v1.7.16
    container_name: traefik
    restart: always
    domainname: test.com
    networks:
      - default
      - t1_proxy
      #- lan >>>this does not work, container fails
    ports:
      - "80:80"
      - "443:443"
#      - "8080:8080"
    environment:
      - CF_API_EMAIL=****
      - CF_API_KEY=****
    command:
      - --logLevel=DEBUG
    labels:
      - "traefik.enable=true"
      - "traefik.backend=traefik"
      - "traefik.frontend.rule=Host:traefik.test.com"  
#      - "traefik.frontend.rule=Host:${DOMAINNAME}; PathPrefixStrip: /traefik"
      - "traefik.port=8080"
      - "traefik.docker.network=t1_proxy"
      - "traefik.frontend.headers.SSLRedirect=true"
      - "traefik.frontend.headers.STSSeconds=315360000"
      - "traefik.frontend.headers.browserXSSFilter=true"
      - "traefik.frontend.headers.contentTypeNosniff=true"
      - "traefik.frontend.headers.forceSTSHeader=true"
      - "traefik.frontend.headers.SSLHost=test.com"
      - "traefik.frontend.headers.STSIncludeSubdomains=true"
      - "traefik.frontend.headers.STSPreload=true"
#      - "traefik.frontend.headers.frameDeny: true" #customFrameOptionsValue overrides this
      - "traefik.frontend.headers.customFrameOptionsValue: allow-from https:test.com"
      - "traefik.frontend.auth.basic.users=****"
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock:ro
      - ./traefik:/etc/traefik
      - ./shared:/shared
networks:
  t1_proxy:
    external:
      name: t1_proxy
  default:
    driver: bridge
  lan:
    external:
      name: br0
Brandon Wilson
  • 4,462
  • 7
  • 60
  • 90

0 Answers0