I'm trying out the new 2.0 GA of Traefik but I'm having trouble getting the most basic of examples working. After reading the documentation and trying different things out for several hours, now I'm here asking for some guidance. I can access the dashboard and raw api info, and I see the whoami router in the dashboard. But when I go to whoami.development.local, I just get 404 page not found. What am I missing?
traefik.yml
deployed using
docker stack deploy traefik -c traefik.yml
version: '3.7'
services:
traefik:
image: traefik:v2.0
command:
- "--log.level=DEBUG"
- "--log.filepath=/traefik.log"
- "--log.format=json"
- "--api=true"
- "--api.dashboard=true"
- "--api.insecure=true"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=true"
- "--entrypoints.http.address=:80"
- "--entrypoints.https.address=:443"
labels:
- "traefik.enable=true"
- "traefik.docker.network=traefik-public"
- "traefik.http.routers.traefik.rule=Host(`traefik.development.local`)"
- "traefik.http.routers.traefik.entrypoints=https"
- "traefik.http.routers.traefik.service=api@internal"
- "traefik.http.routers.traefikloadbalancer.server.port=8080"
networks:
- traefik-public
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
# - ./traefik.yml:/etc/traefik/traefik.yml
- ./ssl:/etc/traefik/ssl
- ./logs/traefik.log:/traefik.log
ports:
- "80:80"
- "8080:8080"
- "443:443"
deploy:
placement:
constraints:
- node.role == manager
update_config:
order: start-first # get new container running first before removing old, for less downtime
rollback_config:
order: start-first # get new container running first before removing old, for less downtime
restart_policy:
condition: any
networks:
traefik-public:
driver: overlay
name: traefik-public
whoami.yml
deployed using
docker stack deploy whoami -c whoami.yml
version: '3.7'
services:
whoami:
image: containous/whoami
networks:
- traefik-public
deploy:
labels:
- "traefik.enable=true"
- "traefik.docker.network=traefik-public"
- "traefik.http.routers.whoami.entrypoints=http"
- "traefik.http.routers.whoami.rule=Host(`whoami.development.local`)"
networks:
traefik-public:
external: true
name: traefik-public