Deploying a Meteor app to Galaxy - a step-by-step guide


#6

Oh - good to know! Thanks for setting me straight.


#7

Fantastic. This should go straight into the Meteor Guide.

One question: does this line actually work?

DEPLOY_HOSTNAME=galaxy.meteor.com meteor deploy my-meteor-app.meteorapp.com --settings settings.json

Don’t you at least need a semi-colon before the start of ‘meteor deploy’? And isn’t the syntax for creating environment variables shell-specific?


#8

Brilliant. If it had been around about 2 hours earlier, you would have saved me a bit of time.

My conclusion was the same: It’s not complicated, it’s just poorly explained/documented.

+1 for the Guide.


#9

Anders - This is a great walkthrough guide! Thanks for putting this together and sharing with the community.

We’ll take this feedback and create a more comprehensive guide to deploying to Galaxy that we’ll make available in our materials.

For specific questions here:

Integrating with the Mongo Oplog is used for performance reasons. It’s not a blocking requirement when deploying to Galaxy.

On Windows the cmd terminal requires that DEPLOY_HOSTNAME be defined separately before executing meteor deploy. So the commands would look like this:
$ SET DEPLOY_HOSTNAME=galaxy.meteor.com
$ meteor deploy …


#10

@rohit2b - great to hear! And thanks for the additional pointer re. using Windows.
@timfletcher - added a note about the Mongo Oplog URL as well. Thanks again!


#11

Thanks very much for your Guide @andersr. I wish it existed sooner since I’m sure many of us (who wanted to support MDG with their paid hosting service), wasted a lot of time struggling with poor Galaxy instructions.

Here are a couple more points that may be helpful to others:

1. There is a Direct Link to Server Logs

if you have further troubles deploying your app, you can directly access your server logs at:

https://galaxy.meteor.com/app/myAppName.meteorapp.com/logs

2. Ensure mLab Credentials are R/W

Maybe it’s just me, but when I saw the mLab read-only setting for username and password, I thought that mLab was asking whether I wanted to deny any incoming web API requests to change the database login credentials, so I set it to true. It turns out that this setting must be for database documents, not the login credentials. Your excellent screenshots helped me realize that the read-only setting must be false (don’t check it). And now everything is working. Thanks again!


#12

Thanks for the additional info! I’ve updated the guide to include this.


#13

Great article @andersr, I’m serving my on galaxy now but I get a bad gateway error when I try opening the app in a browser, according to the galaxy page I need to configure my DNS records to point to galaxy. I’m totally lost at this stage, any help will be deeply appreciated. Thanks


#14

Are you using a custom domain? If so, you need to go to the DNS settings for that domain and create a CNAME record that points to galaxy-ingress.meteor.com


#15

I am trying to deploy to galaxy… . I made a subdomain “www” and added the galaxy-ingress.meteor.com CNAME in the DNS settings …but in my browser, when I go to the app url I get a 404 error saying there is no App registered.

In galaxy, I can see 1 container running with 25% ram being consumed with 0 client so the app is there…kinda lost …any pointers @andersr , @jaclynn

I am confused at the redirecting bit in the domain manager. I have two option :

or

which one should I choose?


#16

Hold on, Galaxy does have mongodb? do have to pay for another service, even after paying Galaxy for a server?


#17

Galaxy just offers app server hosting at the moment, no database. mLab have a free tier which many people use to start with.


#18

should i change my host ? I use 1&1.

Looks like they kinda forces you to choose either a redirect or webspace option by default


#19

In your galaxy settings.json file are you pointing to the “www” sub-domain?

It should look something like this:

{
  "galaxy.meteor.com": { 
    "env": { 
  	"ROOT_URL": "http://www.yourdomain.com/", 
  	...
    } 
  }
}




#20

I personally use name.com and that’s worked great. I tried 1&1 once and did not have a great experience.

However, if you are thinking of transferring, keep in mind that you have to wait 60 days after the initial registration or most recent transfer.


#21

I just closed my account with 1&1. They sold my email to marketers !!! I will make an account with name.com and see how that goes!!


#22

This is confusing. So Do we set an account up with mlab first?


#23

Either order is fine - but you’ll need to update your settings.json file to include your mongoURL which points to your mLab database.

Something like this:

{
"galaxy.meteor.com": {
      "env": {
        "ROOT_URL": "http://myappurl.com",
        "MONGO_URL": "mongodb://dbuser:dbpass@ds065748.mlab.com:65748/dbname",
        "MONGO_OPLOG_URL": ""
      }
    }
}

The MONGO_URL property is provided by mLab when you create your database.


#24

Pain in the ass paying more for a server and not getting a MongoDB with it.


#25

Hey @kaiyes so what was the problem in the end with 1&1? I just changed my DNS to point to Galaxy DNS, and redirected the address without subdomain to www.

What I think I’ve lost is my MX configuration, which points to Google Apps, so I can have Gmail also.