I am trying to get portainer with trafik running.
Using docker-compose files, one for traefik with the addition routing the traefik Dashboard without https.
version: '3'
services:
reverse-proxy:
image: traefik:v2.10
container_name: Traefik
restart: unless-stopped
labels:
- "traefik.enable=true"
- "traefik.http.services.Traefik.loadbalancer.server.port=8080"
- "traefik.docker.network=traefik_default"
- "traefik.http.routers.Traefik.rule=Host(`traefik.mufi`)"
command:
- "--api.insecure=true"
- "--providers.docker"
- "--entrypoints.web.address=:80"
- "--entrypoints.websecure.address=:443"
ports:
- "80:80"
- "443:443"
- "8080:8080"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
Docker-compose for Portainer:
version: '3'
services:
portainer:
image: portainer/portainer-ce
container_name: Portainer
labels:
- "traefik.enable=true"
- "traefik.http.routers.Portainer.entrypoints=websecure"
- "traefik.http.services.Portainer.loadbalancer.server.port=9443"
- "traefik.docker.network=traefik_default"
- "traefik.http.routers.Portainer.rule=Host(`portainer.mufi`)"
# - "traefik.tcp.routers.Portainer.rule=HostSNI(`portainer.mufi`)"
# - "traefik.tcp.routers.Portainer.tls.passthrough=true"
ports:
- "9443:9443"
- "8000:8000"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
As portainer provides its own certificate I want traefik to use it. I tried with the tcp router, but it didn't work.
Accessing portainer directly does work.