There is a certificate resolver defined in the static config, but it so not found in the dynamic docker config:
level=error msg="the router testr uses a non-existent resolver: le"
Here comes a somehow minimal example: the static config traefik.yml
:
entryPoints:
web:
address: ':80'
web-secure:
address: ':443'
traefik:
address: ':8080'
providers:
docker:
watch: true
exposedByDefault: false
api:
insecure: true
dashboard: true
debug: true
certificateResolvers:
le:
acme:
email: daniel@sbgg.ac.at
storage: /var/lib/letsencrypt/acme.json
httpChallenge:
entryPoint: web
domains:
- main: something.sbgg.ac.at
log:
level: DEBUG
Here the full docker-compose
:
version: '3'
services:
traefik:
image: traefik:v2.0.5
ports:
- 80:80
- 443:443
- 8080:8080 # traefik GUI
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./traefik.yml:/etc/traefik/traefik.yml
- /srv/data/letsencrypt:/var/lib/letsencrypt/
restart: always
networks:
- webgateway
nginx:
image: nginx
ports:
- 8000:80 # need this
volumes:
- /home/user/html/:/usr/share/nginx/html:ro
restart: always
labels:
# traefik basic
- "traefik.enable=true"
- "traefik.docker.network=webgateway"
# traefik actual router
- "traefik.http.routers.testr.entrypoints=web-secure"
- "traefik.http.routers.testr.rule=PathPrefix(`/me`)"
- "traefik.http.routers.testr.tls=true"
- "traefik.http.routers.testr.tls.certresolver=le"
# traefik service
- "traefik.http.services.tests.loadbalancer.server.port=8000"
networks:
webgateway:
driver: bridge
I have no idea why it doesn't work. Any suggestions?
(This might be related to Non-existent resolver error with letsencrypt, docker-swarm and traefik v2 but the poster there seems to have something working now.)