I am attempting to serve the Trafik dashboard with basic Auth and am getting the following error:
WARN[0000] The "e6VrNv" variable is not set. Defaulting to a blank string.
traefik:
image: "traefik:v2.10"
container_name: "traefik"
labels:
- "traefik.http.middlewares.test-auth.basicauth.users=user1:$$2b$05$e6VrNv.t8F4C5CAeztQNkeO9Y5CjzTgCZKcWdF3CBmy/tZs20mkpS,user2:$$2b$05$e6VrNv.t8F4C5CAeztQNkeO9Y5CjzTgCZKcWdF3CBmy/tZs20mkpS"
- "traefik.http.routers.api.rule=Host(`traefik.MyDomain.com`)"
- "traefik.http.routers.api.service=api@internal"
- "traefik.http.routers.api.middlewares=auth"
command:
#- "--log.level=DEBUG"
- "--api.insecure=true"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.web.address=:80"
- "--entrypoints.websecure.address=:443"
- "--certificatesresolvers.myresolver.acme.dnschallenge=true"
- "--certificatesresolvers.myresolver.acme.dnschallenge.provider=cloudflare"
#- "--certificatesresolvers.myresolver.acme.caserver=https://acme-staging-v02.api.letsencrypt.org/directory"
- "--certificatesresolvers.myresolver.acme.email=postmaster@wwwmri.com"
- "--certificatesresolvers.myresolver.acme.storage=/letsencrypt/acme.json"
ports:
- "80:80"
- "443:443"
- "8080:8080"
environment:
- CLOUDFLARE_EMAIL=MyEmail@gmail.com
- CLOUDFLARE_DNS_API_TOKEN=MyToken
volumes:
- "./letsencrypt:/letsencrypt"
- "/var/run/docker.sock:/var/run/docker.sock:ro"
web1:
image: nginx:latest
container_name: "web1"
labels:
- "traefik.enable=true"
- "traefik.http.routers.web1.rule=Host(`web1.MyDomain.com`)"
- "traefik.http.routers.web1.entrypoints=websecure"
- "traefik.http.routers.web1.tls.certresolver=myresolver"
volumes:
- ./index1.html:/var/www/websites/index.html
- ./default.conf:/etc/nginx/conf.d/default.conf
How and where do I add the environment variables?