I'm trying to access dashboard and I have set "traefik.enable=true"
for service: traefik
under labels
but In the logs I'm getting level=debug msg="Filtering disabled container" providerName=docker container=traefik-traefik-x0vc6akmqhzh6q2ttyhnr4jgi
. Hence unable to create a LetsEncrypt cert. Not getting any error in logs.
config
version: '3.8'
services:
traefik:
image: "traefik:v2.2"
hostname: traefik
deploy:
replicas: 1
restart_policy:
condition: on-failure
delay: 5s
max_attempts: 5
placement:
constraints:
- node.hostname == mynode
command:
- --api=true
- --api.dashboard=true
- --api.debug=true
- --providers.docker=true
- --providers.docker.endpoint=unix:///var/run/docker.sock
- --providers.docker.swarmMode=true
- --providers.docker.exposedbydefault=false
- --log.level=DEBUG
- --accesslog=false
- --entryPoints.web.address=:80
- --entryPoints.websecure.address=:443
- --certificatesResolvers.letsencrypt.acme.caServer=https://acme-staging-v02.api.letsencrypt.org/directory
- --certificatesResolvers.letsencrypt.acme.tlsChallenge=true
- --certificatesresolvers.letsencrypt.acme.email=myemail@gmail.com
- --certificatesResolvers.letsencrypt.acme.storage=/letsencrypt/acme.json
#- --certificatesResolvers.letsencrypt.acme.httpChallenge.entryPoint=web
labels:
- "traefik.enable=true"
- "traefik.docker.network=proxy"
- "traefik.http.routers.api.rule=Host(`traefik.example.com`)"
- "traefik.http.routers.api.service=api@internal"
- "traefik.http.routers.api.middlewares=auth"
## Middlewares
- "traefik.http.middlewares.auth.basicauth.users=alpha:$$apr1$$Bz.UZC1x$$.joBaPFxh5M64dzTYMiNv0"
### host header
- "traefik.http.middlewares.hosthdr.headers.stsseconds=31536000"
- "traefik.http.middlewares.hosthdr.headers.stsincludesubdomains=true"
- "traefik.http.middlewares.hosthdr.headers.stspreload=true"
# global redirect http to https
- "traefik.http.routers.http-catchall.rule=hostregexp(`{host:.+}`)"
- "traefik.http.routers.http-catchall.entrypoints=web"
- "traefik.http.routers.http-catchall.middlewares=httpsalways"
# middleware redirect http to https
- "traefik.http.middlewares.httpsalways.redirectscheme.scheme=https"
- "traefik.http.middlewares.httpsalways.redirectscheme.permanent=true"
- "traefik.http.middlewares.httpsalways.redirectscheme.port=443"
# enable https for api/dashboard
- "traefik.http.routers.api.tls=true"
- "traefik.http.routers.api.tls.certresolver=letsencrypt"
- "traefik.http.routers.api.entrypoints=websecure"
- "traefik.http.routers.api.tls.domains[0].main=traefik.example.com"
# dummy port
- "traefik.http.services.dummyservice.loadbalancer.server.port=1111" # In swarm mode, traefik requires a dummy Port
ports:
- target: 80
published: 80
mode: host
- target: 443
published: 443
mode: host
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
- "./letsencrypt:/letsencrypt"
#- "./basicauth:/basicauth:ro"
networks:
- proxy
Please help. I'm using version: 3.8