Skip to content

Instantly share code, notes, and snippets.

@Demacr
Created June 28, 2020 20:09
Show Gist options
  • Save Demacr/f44daebc4e06bede3ebfc201297db141 to your computer and use it in GitHub Desktop.
Save Demacr/f44daebc4e06bede3ebfc201297db141 to your computer and use it in GitHub Desktop.
Traefik 1.7 basic auth
version: '3'
services:
myservice:
image: myimage
labels:
- "traefik.frontend.rule=Host:mydomain.com"
- ...
- "traefik.frontend.auth.basic.users=<USER-PASSWORD-OUTPUT>"
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