Releasing a Meteor-Angular App To Digital Ocean

I am not going to go super in depth on this but I do want to talk about what I learned by going through the steps of setting up a Digital Ocean server and building the text adventure game to release to it.

What You Need

  1. A computer with an internet connection and an ssh client
  2. A MeteorJS app you want to put online
  3. An account at Digital Ocean
  4. $5 or you can use my referral link to get $10 in free credit at Digital Ocean

First Step – Set up a Server

There are quite a few guides out there about setting up a server on Digital Ocean. They even have there own documentation section that is actually really good. Basically all you need to do is click “Create Droplet” from the Digital Ocean home page and select the options you want. You can get by with the $5 minimum size droplet, especially for testing purposes. I used a basic Ubuntu 14.04 install for this test.

I tried doing the meteor install manually initially and ran into a snafu. The base $5 droplet only has 500MB of RAM. This is not really enough for Mongo and NodeJS to run and do install things for Meteor. You may need to manually create a SWAP partition. I used this guide from Digital Ocean’s docs and created a 2GB SWAP space. This is basically just telling the server to use some of the hard drive space like RAM. This is not recommended for production scenarios but works just fine for testing.

Step Two – Use Meteor Up

While you can install Meteor and Mongo and NodeJS or Nginx all manually, I would recommend using Meteor Up. It has clear instructions and handles all of the yak shaving for you. All you need is to install it using npm.


npm install -g mupx

then do:


cd to_your_meteor_app_directory
mupx init

Then you fill out a nice configuration file and run:


mupx setup
mupx deploy

and you are done!

Additional Steps

If own a domain and want to point it at your server, get the name servers from the site you bought your domain from and go into Digital Ocean’s Networking page, select Domains from the menu on the side and add a domain to your server.

Disclaimer

This is not necessarily the right way nor the best way to deploy a MeteorAngularJS app. It is however a very simple and quick way of getting it deployed to testing environment.

Another way of getting an easy deploy on inexpensive hosting setup is to use Galaxy which is designed for Meteor apps specifically. This is now recommend in the Meteor tutorial as Meteor.com no longer supports free hosting for Meteor apps. I have not used this yet personally but it is another easy option.

Put some code out in the wild and don’t forget your Free $10 credit on Digital Ocean.

I Want to Be a Better Developer