I’ve seen a few discussions in chats and forums on deploying Meteor lately. I was faced with a decision of which of the options to use for a demonstration app, so I’m sharing my experience.
- After some digging, the choices I considered were, Galaxy from Meteor, Scalingo, Modulus, Heroku, Digital Ocean and Amazon Web Services (AWS)
- Scalingo looked like the best from a price and simplicity perspective, so I gave their 30-day free trial a go
- The app is up and running on Scalingo after a few hiccups and great technical support from their senior team
What I was Looking For : Cheap and Easy
No decision can be made without thinking through the requirements. Here were mine:
- Low Cost – The app I wanted to host was just a demo app. So, I needed something inexpensive
- Low Volume – I anticipated a very small load, so I wasn’t concerned about scalability
- Low Latency – The demo app leveraged Meteor’s real-time capabilities in a gaming context, so I needed fast response time. (I.e. I needed Oplog tailing)
- Simple to use – I have limited experience with deployment tools and limited time to work on the project, so I wanted something that just worked
Analysis of Choices
|Cost (USD for cheapest appropriate option)||Simplicity||Concerns, Issues & Decision|
|Galaxy||$0.035/hr = $25/month + $15/month for Mongo hosting (lowest tier with OpLog tailing) ~$40 / month||Meteor itself looked very simple, but you have to do Mongo separately.||I didn’t like having to buy from two venders and then figure out the settings for each. Having >1 point of contact for support was also a concern.
Maybe this will be a good later if/when they have a fully integrated Mongo solution priced for hobby apps.
|Scalingo||$0.026/hr = $18.72/month (based on 1.13 EU-USD conversion rate) (This is for a 512MB host. There is a 256MB for half the cost) Scalingo’s free Mongo tier includes Oplog Tailing.||Web site promised just “git push” and done.||Small unknown company, but “Yes” let’s give them a try.|
|Modulus||$28.80 / month||Looked fairly simple with Meteor specific docs.||No Oplog tailing, so not knocked out of consideration.|
|Heroku||Free, $7 (hobby tier), $25 (standard) / month. https://www.heroku.com/pricing||These are all generic containers. MUPX (https://github.com/arunoda/meteor-up/tree/mupx) looks like a good tool to make it easy to deploy.||My lack of time and experience deploying, made me concerned about how long it would take me to get everything working.
Maybe later I’ll try one of these. I’ll chicken-out for now.
|Digital Ocean||$5/$10/$20/… per month|
|AWS||Free (1st 12 months), lots of complicated blah, blah, blah, on pricing. https://aws.amazon.com/tco-calculator/|
How it Went
Proof is in the pudding:
- Web version: https://for-real-cards.scalingo.io/
- Android: https://play.google.com/apps/testing/com.fabrica.forrealcards1
- iPhone: Looks like Apple’s brittle Test Flight process doesn’t let me just provide a link. Drop me a note on the contact page if you’re interested.
- The app is work-in-progress, so forgive the bugs and lack of styling.
- Source is here: https://github.com/kokokenada/for-real-cards
- I ran into a few problems (detailed below) that were all resolved through dependency or configuration changes
- Scalingo were very fast to respond with helpful suggestions, even though some of my inquiries were of the RTFM nature
- I had a few build errors when deploying. These were pretty straight forward to figure out and Scalingo were quick to respond. I probably wouldn’t have emailed them, if they weren’t proactively reaching out.
- My app is using GraphicsMagick (GM) and UploadFS (https://github.com/jalik/jalik-ufs) to manage user avatars.
- Uploading images had a silent failure (always a productivity curse, in my opinion), when resizing images on the server. (GM was not installed by default and no one complained.) It took a while to figure this out by poking around on the Mongo tables and instrumenting the code, but it was dumb mistake in the end.
- Scalingo has very good support for GM and there was a ready-made deployment configuration to add it: http://doc.scalingo.com/internals/graphicsmagick-buildpack.html
Mobile Hot Code Deploy Configuration
- A really cool feature of Meteor’s Cordova distribution, is the ability to push updates to your mobile by simply pushing to the server instead of going through the app store process.
- Before I had the correct configuration, I had the error “com.meteor.webapp.WebAppException: Error parsing asset manifest” and found some discussion on stack overflow of the same: http://stackoverflow.com/questions/37261181/meteor-error-com-meteor-webapp-webappexception-error-parsing-asset-manifest
- After a nudge from the kind folks at Scalingo, the resolution was drop-dead easy: http://doc.scalingo.com/getting-started/meteor-android-cordova-ios-setup.html
No discussion of deployment wouldn’t be complete without discussing the mobile app deployment process. This ended being one of the more time consuming parts of the deployment process.
Generally speaking, the Google Play Store process is smooth and, necessarily tedious. Registering as a developer will cost you $25, and you have to spend a fair amount of time preparing graphics, app ratings and doing your release build.
The Apple store process is more complex and error prone. It costs $100 and an enjoying read of the huge SDK agreement.
Ionic has a great cheat sheet (http://ionicframework.com/docs/guide/publishing.html) that is largely relevant for Meteor too.
A couple of problems to watch out for:
- Once you “publish” your app on Google, even as an alpha, you are locked into the ID you use. Somehow, I ended up with a weird app ID (‘com.<random digits>’) and ended up abandoning my first app and had to enter all the app info in again. (Moral of the story: carefully review everything before you publish on Play Store, some things can’t be undone.)
- There is a bug in the Meteor build process that messes with Android version #. (https://github.com/meteor/meteor/issues/7205). This was more of a problem than you think it might be because the Google Play Store will reject your APK’s if there’s a problem with its version.
- When you change settings in mobile-config.js, sometimes they did not make it into the .APK. I didn’t figure out exactly what the problem was but I found I had to delete the ./meteor/local directory to get my changes reflected. There’s probably a better way, but that did the trick.
I’d recommend Scalingo for Meteor because of the simplicity, great support and reasonable price.
Some related threads: