Created
June 28, 2020 20:09
-
-
Save Demacr/f44daebc4e06bede3ebfc201297db141 to your computer and use it in GitHub Desktop.
Traefik 1.7 basic auth
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3' | |
services: | |
myservice: | |
image: myimage | |
labels: | |
- "traefik.frontend.rule=Host:mydomain.com" | |
- ... | |
- "traefik.frontend.auth.basic.users=<USER-PASSWORD-OUTPUT>" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get install apache2-utils | |
echo $(htpasswd -nbB <USER> "<PASS>") | sed -e s/\\$/\\$\\$/g # $ -> $$ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment