Galaxy - NUDelta/dtr-guides GitHub Wiki
Galaxy's primary selling points are:
- very quick deployment process
- simplified scaling if one server gets overloaded
- handy-dandy immediately available analytics (e.g. users online, CPU consumption, etc.)
You should not use Galaxy if:
- You're not building a Meteor app
- Make sure you're a part of the DTR Galaxy Account. If not, ask anyone in it (e.g. Kevin or Haoqi) to add you. If someone doesn't know how, direct them to this guide with your Meteor username (
meteor whoamiin terminal). - Find cloud MongoDB hosting. I'd recommend signing up for a mLab and getting a free instance. To do so, click "Create New". For "Cloud Provider", AWS US-East is probably best, but doesn't really matter -- just get something in the US, since that's where the Meteor app will be. For "Plan", the free one is the first under "Single-node". Click on the one you've now created, and add a user -- you'll be using this username and password later, not the one you originally signed up for mLabs with. Take note of the part at the top with the URL -- you'll need it for below and to connect to your
mongoshell directly. - Acquire a domain name or find a free
<your-app>.meteorapp.comdomain (these replace the former<your-app>.meteor.com. I'm not sure there's a good way to check if it's taken besides just visiting these urls. - Create a
settings.jsonin the root of your Meteor project as follows:
{
"galaxy.meteor.com": {
"env": {
"ROOT_URL": "http://[your-app].meteor.com",
"MONGO_URL": "mongodb://<username>:<password>@<mongodb-url>"
}
}
}This is basically the same as meteor deploy, but prepended with DEPLOY_HOSTNAME=galaxy.meteor.com. So:
DEPLOY_HOSTNAME=galaxy.meteor.com meteor deploy [your-app].meteorapp.com --settings settings.jsonThe settings.json is mandatory. Ok, so it should be up -- head to Galaxy to check it out. If it's not there...
If you have an individual developer account, you'll probably have to transfer the app to the DTR organization. To do so:
DEPLOY_HOSTNAME=galaxy.meteor.com meteor authorized [your-app].meteorapp.com --add dtrIf you've got your own domain, look at this article. Very basically, the recommended practice is to set a CNAME record pointing to galaxy-ingress.meteor.com for the www/ host, and redirect all traffic to www/.
Open up the DTR Galaxy Account Management Page, click "Change" in the top right. Find "dtr" in the list, hit "edit members", then add the person's username.