At this moment this blog is deployed on a U$5 instance at Digital Ocean(at the end of this post, will not) and I’m using several packages here, including spiderable. The problem is that when Googlebot comes here trying to index this site, an 500 internal server error happens. Looking for answers I saw this post saying that this it is a memory issue.
Ok, I thought, I’ll increase my instance to see if this really solve my problem. Hmm, 1Gb U$10, let me see Scalin.go, 1Gb €28.82, is that right?
I don’t know, I don’t care, I don’t want to pay anything, I just want to see if my problem is memory, let me see Google. Nice! 2 months of free trial and if I decide to stay there, a little machine with 1 processor and 1.7Gb will cost U$13.80. I’ll give it a chance, but obviously I’ll use a bigger machine during this trial period =] So let’s go.
Preparing the machine
Go to https://console.developers.google.com and create a new project, on the next screen, go to VM instances and wait while Google initialize the Compute Engine for your project, then click on Create instance button.
On the next screen you can choose your Machine type (click here to compare Google instances) and (here to calculate how much it’ll cost). In my case I chose an n1-highmem-2, yes I know, 2 cores, I’m using Meteorhacks Cluster =]
Important: If you are planning to use mup like me, you need to use Ubuntu, preferably 14.xx ok?
Ok! Next step is add our SSH keys.
I’m using my root key to make mup setup easier.
Go to Access & secutity tab and paste the content of your id_rsa.pub there.
Now, go to the bottom and click on Create button and wait Google Create your VM instance.
Ok, click on the name of your instance and look for External IP and Edit it, change from Ephemeral to New static IP address and click on Create.
Ok, machine setup is done.
Preparing your application
If you don’t have mup (meteor up) installed yet, install.
npm install -g mup
Now go to your project and create the mup configuration file
Open the mup configuration file and set it up with you own informations, you can see my own here
Now run mup setup to see the magic happening, meteor up will setup node, phantom, mongo and everything that you need to deploy your app!
Now, the most expected moment, mup deploy
After complete, just open your browser and digit your address eg “184.108.40.206 without 3000” and you’ll see your app!!
I’m not saying that Google is cheaper than Digital Ocean or that is easier to deploy as Scalin.go, I’m just saying that Google is a real and nice option to host Meteor apps. And about my problem with Googlebot, I don’t know yet but trying by myself, passing ?_escaped_fragment_= parameter in my urls, it seems that the problem disappeared. Let’s see what happens when Googlebot comes again =]