Say, I have my meteor app on app.com
through Galaxy. Can I serve a totally unrelated site on unrelated.app.com
, from a completely different hosting?
What should be the DNS config and stuff?
Yes - Iād recommend against deploying your first app using a naked domain (app.com
), but instead use something like www.app.com
. You could then easily deploy a second app using unrelated.app.com
.
For DNS instructions, check the āHow do I configure DNS?ā help section once logged into Galaxy.
Whatās the diff bw www.app.com
and app.com
?
See http://www.yes-www.org/why-use-www/.
Using www.
will also make your life much easier when hosting with Galaxy - they go into more detail on this in the Galaxy āHow do I configure DNS?ā help section.
And if I use www.app.com, can I serve landing.app.com from the same container (and avoid paying double price)?
There is a 1 app per container limit in place so you wouldnāt be able to have an app deployed at www.app.com
and another deployed at landing.app.com
, on the same container. As for possibly having one app deployed that handles both URLs, and serves up different content depending on that URL, I also donāt think thatās possible (but havenāt tried). When your DNS CNAME record is updated to point to galaxy-ingress.meteor.com
, Galaxy needs to know which app to send people to. This is handled by looking at the requested domain name and matching it with an app deployed to the same domain name (the domain name that the app was deployed to using DEPLOY_HOSTNAME=galaxy.meteor.com meteor deploy [hostname]
). If you try to deploy with the 2 different hostnames, youāll end up with 2 apps on 2 containers.
There might be a workaround for all of this though, so itās best to reach out to Galaxy Support directly.
Ok, nice to know. Thanks
Could you advise for this scenario: say, my app is down for maintenance or by china hakkers - Iād like to quickly put up a simple static page saying āapp is under maintenanceā - is there a simple way to do that?
Normally Iād recommend just having a static HTML maintenance page somewhere that you could quickly update your web server / proxy to redirect all incoming requests to, as needed. In the case of Galaxy though we donāt have this kind of control. It would be great if Galaxy offered something similar to Herokuās Maintenance Mode, but they donāt (yet anyways). In the meantime Iād recommend looking at Amazonās Route 53 DNS service. They have DNS failover options so if your site is unreachable you can automatically redirect users to a temporary maintenance site somewhere else.
All of the above being said, if your app has completely crashed and itās taken you by surprise, then you might want to consider deploying a small āmaintenance modeā app (to replace your main app). This way youāre at least showing visitors something while you work on the issue (via a dev or staging instance of your application somewhere else, thatās pointing to your production database).