One can add simple HTTP password protection to NGINX.
Add an environmental variable to set the password. -e PASSWORD=<password> along with a sed to inject into NGINX conf file at runtime.
Mucho convenient for ad-hoc tools that are restricted or confidential.
Bonus points if we include a little utility that can change the password with a docker exec -it <container-name> new_password "NEW_PASSWORD" for password rotation.
One can add simple HTTP password protection to NGINX.
Add an environmental variable to set the password.
-e PASSWORD=<password>
along with ased
to inject into NGINX conf file at runtime.Mucho convenient for ad-hoc tools that are restricted or confidential.
Bonus points if we include a little utility that can change the password with a
docker exec -it <container-name> new_password "NEW_PASSWORD"
for password rotation.Literature : see -
https://www.digitalocean.com/community/tutorials/how-to-set-up-basic-http-authentication-with-nginx-on-ubuntu-14-04