Hi guys!
I am trying to get traefik v2 to work after using traefik v1 for quite some time.
I read the post from https://blog.containo.us/traefik-2-0-docker-101-fc2893944b9d so I mainly used it as the base.
version: "3"
services:
traefik:
image: "traefik:v2.0.1"
command:
- --entrypoints.web.address=:80
- --entrypoints.websecure.address=:443
- --providers.docker
- --api.insecure
- --certificatesresolvers.leresolver.acme.caserver=https://acme-staging-v02.api.letsencrypt.org/directory
- --certificatesresolvers.leresolver.acme.email=example@example.com
- --certificatesresolvers.leresolver.acme.storage=/acme.json
- --certificatesresolvers.leresolver.acme.tlschallenge=true
ports:
- "80:80"
- "443:443"
- "8080:8080"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
- "./acme.json:/acme.json"
labels:
- traefik.enable=true
- traefik.port=8080
- traefik.frontend.rule=Host:example.example.xyz
my-app:
image: containous/whoami:v1.3.0
labels:
- "traefik.http.routers.my-app.rule=Host(`whoami.docker.example.xyz`)"
- "traefik.http.routers.my-app.middlewares=auth"
- "traefik.http.routers.my-app.entrypoints=websecure"
- "traefik.http.routers.my-app.tls.certresolver=leresolver"
- "traefik.http.middlewares.auth.basicauth.users=user:$$apr1$$q8eZFHjF$$Fvmkk//V6Btlaf2i/ju5n/" # user/password
example.example.xyz is replaced from my real site.. but when I tried to go onto the site I just get
Warning: Potential Security Risk Ahead
404 page not found
Are the labels a thing of the past? How to get this work?