Traefik Container being detected by itself - Is this intended?

I've got Traefik running in Secure Mode via api@internal as the service, however I've also seen that there is a service for the container that Traefik is running in as well.

Is this intended behaviour?

version: '3'

services:
  traefik:
    # The official v2 Traefik docker image
    image: traefik:v2.6
    hostname: traefik
    container_name: traefik
    # Enables the web UI and tells Traefik to listen to docker
    command: 
    - --entrypoints.web.address=:80
    - --api.insecure=false
    - --api.dashboard=true
    - --providers.docker
    - --providers.docker.exposedbydefault=false
    - --api.debug=true
    ports:
      # The HTTP port
      - "80:80"
      # The Web UI (enabled by --api.insecure=true)
      # - "8080:8080"
    volumes:
      # So that Traefik can listen to the Docker events
      - /var/run/docker.sock:/var/run/docker.sock
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.dashboard.rule=Host(`traefik.home`)"
      - "traefik.http.routers.dashboard.service=api@internal"
      - "traefik.docker.network=traefik"
    networks:
      traefik:
        ipv4_address: 172.16.0.2
      
networks:
  traefik:
    name: traefik
    ipam:
      driver: default
      config:
        - subnet: "172.16.0.0/16"

Hello @CyberiumShadow,

As you configured your traefik docker container to have the traefik.enable=true label, Traefik picks it up as a potential service. Change it to true to remove it.

Hello,

I presume you mean changing traefik.enable=true to traefik.enable=false?
In that case, in order to navigate to http://traefik.home, it would require the use of the file provider correct?

http:
  routers:
    dashboard:
      entryPoints:
      - web
      service: api@internal
      rule: Host(`traefik.home`)

yes, indeed

yes, indeed

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