-
-
Notifications
You must be signed in to change notification settings - Fork 981
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create central nginx proxy load balancer #243
Comments
I was able to get Example repo at https://github.com/markshust/nginx-proxy-mkcert |
Hi, Maybe get inspired by this following solutions: https://github.com/nginx-proxy/nginx-proxy |
for local development you might look into Minikube. Pretty interesting in my opinion, and the configuration could be easily transferred to Kubernetes later. |
You could also leverage a project like Traefik to provide reverse proxy to multiple projects, and the only addition to this one would be some docker-compose.yml configuration changes (or potentially a docker-compose.traefik.yml file). There are some complexities with this, but it's how I generally run my projects and it works fine. |
The problem with the current setup is that you cannot have multiple instances of Magento running at the same time unless each of the services run on a separate port. This is not ideal and confusing.
Ideally, we want an Nginx load balancer to sit in front of everything. For example:
dm start
will start this Nginx load balancerWe then need to "register" sites with the load balancer. For example
dm register ~/Sites/mysite
will register the site with the load balancer, as well as setup SSL. I was previously looking into and working with https://github.com/nginx-proxy/nginx-proxy -- this setup seemed to work fine for NodeJS apps, but it buckled around Magento's complex setup and when it came to running SSL.It's possible this central nginx load balancer could become a project entirely on its own, as this is a common problem with all docker projects, not just
docker-magento
. We could use Kubernetes, but I'd like to keep things simple in local dev. I think a simple proxy which allows users to register and deregister sites with the load balancer, and automatically sets up SSL certs for mac & linux would be sufficient.The text was updated successfully, but these errors were encountered: