Stephen Afam-Osemene
Posted on August 27, 2017
I build a lot of websites, and I run them in Docker containers. What happens is, I end up with URLs like this 0.0.0.0:1234
.
This is a problem because,
- They are difficult to remember
- Do not allow sub-domains.
- Bad for password managers
My initial solution was to add a reverse proxy with Nginx so I have virtual hosts that point to my containers. However, this means I was writing the same Nginx configuration, over and over again, only with different ports.
So as any sane developer will do, I took a couple hours to automate the process once and for all.
The solution
I ended up creating a docker image to generate my configuration files and be a proper reverse proxy.
You can find it here
Features
- Sets up reverse proxies with just a few lines of configuration
- Can automatically obtain SSL certificates from let's encrypt
- Can be used to set up load balancing between several servers
- Allows fine tuning of the load balancing configuration.
I'll add more features as I discover more use cases. Let me know if there is anything
Proper details on how to use are in the README.md
of the repository.
If you like it, star on GitHub.
Posted on August 27, 2017
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.
Related
November 25, 2024