-
Notifications
You must be signed in to change notification settings - Fork 392
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
MUPX Feature Discussion - proxy, vhost, force-ssl, nginx and docker #458
Comments
Right now we are using force-ssl meteor package and it works pretty well for us. But, in the long run we need to support www redirect also. So, I think it's better to handle it via nginx layer. We should allow it by default, but should be possible to turn it off. (If the user is managing SSL and other stuff) Right now we are not proxying port 80 with nginx. But it the user is asking to implement force-ssl and www-redirect via |
That's another issue and we won't support it. On Mon, Jun 1, 2015 at 5:13 PM steeve cannon notifications@github.com
|
That is valid. Would you like me to take a stab at support for force-ssl then? If so, will the strategy be through mupx and mup.json and not via configurable docker containers? Should nginx always listen 80 and proxy? Regardless of whether ssl or force-ssl is being used, it seems valid that nginx should always listen on 80 and proxy to a backendPort. Although that forces use of mup-frontend-server even if you aren't using SSL. Right now if you aren't using SSL then mup-frontend-server is not used. |
We can start by listening to port 80 by default. We still need to use But, we need to pass the app when running the docker container via env vars. On Mon, Jun 1, 2015 at 7:14 PM steeve cannon notifications@github.com
|
@arunoda @stephentcannon have you made any progress on forcessl? |
is there a way to remove force-ssl ? I have a widget and sometimes its a curse to have https.. any thoughts on this ? |
If you integrate LetsEncrypt your free keys should be no reason to not use ssl. Without it passwords can be seen. |
Yes I do know that. so what i did was remove MUPX SSL and setup my own nginx setup on the server, So if the user visit http then the server serves http. but for login signup i will have the links setup for https so the user will request the https
|
My application is a financial application that touches consumer credit card data mag stripe data and must use Meteor's forcessl.
As well, each new customer gets their own instance of the Meteor application. Considering that it is a mission critical financial application I cannot consider multi-homing multiple clients in a single application or database. It would just be irresponsible. I don't care that Square, Intuit Quickbooks POS or other point of sale companies do it. It isn't right.
That creates another requirement, namely to be able to handle requests with a wildcard SSL certificate thereby complicating things a little bit.
So, mupx is great for deploying and managing multiple instances. Except that it wasn't supporting force-ssl,
Currently, when deploying with mupx it forces your meteor app to launch on port 80.
Even if you use mupx ssl termination, it only handles 443.
This issue opens up a discussions of how can we implement force-ssl while still using mupx's excellent ssl handling and how we might implement proxying and vhosts and maybe even load balancing.
I have successfully used mupx to deploy nginx on port 80 and 443 for ssl termination and my meteor app on another port (58080).
I did it through some rough hacking and hard coding because I didn't not want to force a solution on the community.
Rather I think it would be good to get Arunoda and his team as well as the community to steer this project to a suitable solution in order to solve these common set of issues.
So, I cloned the docker containers for MeteorD, Mup Front End Server and Mupx and made manual static changes.
You can see for yourself.
https://registry.hub.docker.com/u/etherpos/meteord/
https://registry.hub.docker.com/u/etherpos/mup-frontend-server/
As well, I cloned mupx and made some static changes just to get this to work.
https://github.com/stephentcannon/meteor-up/tree/mupx
https://github.com/EtherPOS/mup-frontend-server/tree/forcessl
https://github.com/EtherPOS/mup-frontend-server/tree/forcessl
Here is what I did to get it to work in a very static manual manner.
This causes nginx to listen on 80, forces ssl and proxies to 58080 properly while still using mupx to handle ssl certification installation, etc... because it is all dockerized.
Then I deployed and it worked great. You can test it by visiting http://base.etherpos.com and you will see that nginx is listening on 80, forcing to 443 and proxying requests to 58080. Also, it is preventing direct access to 58080 either with or without SSL which is what force-ssl should do.
So, what is the strategy for implementing this?
Strategy 1 - Implement force-ssl only to comply with the Meteor package
Maybe have an environment variable
I think with these 3 pieces of information we could at least implement force-ssl where nginx listens on 80, forces to 443 and proxies to the backendPort easily enough.
Strategy 2 - Use mupx and mup.json to configure ports, proxies, etc...
We could have new environment elements.
I am honestly not even sure how we would begin to handle all of these requirements from the mup.json
It starts to get quite complicated when we start thinking about vhosts, proxying, load balancing etc...
Strategy 3 - Use mupx and mup.json to configure which docker container to use as the front end and the meteord.
Instead maybe mupx does what it does best. Help you deploy but lets you decide what docker container you want to use for the Mup Front End docker container and the MeteorD docker container.
This could really open up some possibilities for people that want to do load balancing, vhosts, proxying and routing to multiple apps based on varying requirements coming into nginx as well as all the good stuff like ssl termination and certificate handling.
Maybe something like...
To be used in meteor-up/templates/linux/start.sh
I am not sure how we would set the sslConfig part though. Currently, mupx doesn't have the line. I tossed that in there because I am using force-ssl,
Another advantage of using this last strategy is that it would allow people to package other applications with their deployment if they want. It could go so far as having a way to support deployment of other docker containers inside the task runner like email servers, etc... but that might be out of scope.
Next Steps
This started as an email discussion between Arunoda and myself and I sent him some details on what I did to get this working. It would be easy if for only force-ssl via another environment parameter.
I firmly believe supporting force-ssl is absolutely necessary because it is a core package. Mupx not supporting core Meteor features seems important and that was my primary goal.
While exploring this I saw other people asking about vhosts, proxying, load balancing, etc... and thought that all of it is probably within reach if a strategy can be agreed upon.
So, with that said, comments and help everyone?
The text was updated successfully, but these errors were encountered: