Docker - Traefik Advanced
Intro
After a Basic Setup with fix Configuration, here an example where we put some Variables in a “.env” File.
Requirements:
Linux Host with Docker see here, Public IP Adress and rechable Port 80 & 443
two FQDN pointing to your IP:
- traefik.yourdomain.de
- whoami.yourdomain.de
Env Vars
let’s run the following Commands which generates a “.env” File. It will also create a User “dashboard” and ask you twice for the Password
echo 'domain="your.domain.de"' > .env
echo 'traefik="traefik.${domain}"' >> .env
echo 'whoami="whoami.${domain}"' >> .env
echo 'mail="name@${domain}"' >> .env
echo -n 'dashboardaccount="' >> .env; echo -n $(htpasswd -nB dashboard) |sed -e s/\\$/\\$\\$/g >> .env; echo '"' >> .env
.env
and here is the Content of my .env File.