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"