-
-
Save ideaengine007/30bcb6ab8e4c0d35b9b30d1b3e505688 to your computer and use it in GitHub Desktop.
Docker Compose YAML for observing Traefik BasicAuth middleware with nginx container
This file contains hidden or 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
| services: | |
| reverse-proxy: | |
| image: traefik:v2.10 | |
| command: --providers.docker --entrypoints.web.address=:80 | |
| ports: | |
| - "80:80" | |
| volumes: | |
| - /var/run/docker.sock:/var/run/docker.sock | |
| nginx: | |
| image: nginx:latest | |
| labels: | |
| - "traefik.http.routers.nginx.entrypoints=web" | |
| - "traefik.http.routers.nginx.rule=Host(`nswashere.local`)" | |
| - "traefik.http.routers.nginx.middlewares=auth" | |
| - "traefik.http.middlewares.auth.basicauth.users=test:$$2y$$12$$ci.4U63YX83CwkyUrjqxAucnmi2xXOIlEF6T/KdP9824f1Rf1iyNG" # credentials test:test | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment