kornholio
kornholio

Reputation: 33

What's the best way to deploy a meteor-app?

There are a few kind of types to deploying a meteor-app. For example I found a third-party tool (meteor galaxy).

Is it usefully to use it or should I deploy it directly to a registered domain?
What´s the pros and cons?

What´s the best (or correct) way to deploy it?

And what do I have to keep in mind?
mongoDB is not neccessary for this app. It'll run on SSL at a Linux machine.

Upvotes: 0

Views: 713

Answers (3)

Thusila Bandara
Thusila Bandara

Reputation: 293

  1. Install Meteor.js and Heroku toolbelt

    For Mac:

    curl https://install.meteor.com/ | sh
    

    For Windows:

    Meteor installer
    

    Heroku: Heroku Toolbelt

  2. Create your Meteor application

    meteor create foobar
    cd foobar
    
  3. Initialize the directory as a git managed repository

    git init
    git add .
    git commit -m "My first commit!"
    
  4. Create your Heroku instance

    heroku login 
    heroku apps:create foobar
    
  5. Set a Meteor buildpack for your Heroku instance

    heroku buildpacks:set https://github.com/AdmitHub/meteor-buildpack-horse.git
    
  6. Create a new mLab* instance

    heroku addons:create mongolab:sandbox
    
  7. Get your MongoLab URI

    heroku config | grep MONGODB_URI
    

// Alternatively, run "heroku config" to display all your configuration variables, but truthfully we only need the MONGODB_URI

// Be careful of running "heroku config" and leaving your console in the open since it displays all your important environment variables like Stripe API keys

  1. Set the configurations of your Meteor app running on Heroku

    heroku config:add MONGO_URL=<MONGODB_URI value>
    heroku config:add ROOT_URL=https://foobar.herokuapp.com
    
  2. Check your remotes to ensure heroku is there

    git remote -v
    
  3. Deploy the app

    git push heroku master
    

Upvotes: 1

Ashvin Sharma
Ashvin Sharma

Reputation: 583

I had this problem in past and I now deploy on Heroku, it recognizes as node.js application but there will be no problem as such.

This is the post which helped me. Hope it helps you.

Upvotes: 1

Mikkel
Mikkel

Reputation: 7777

This question is pretty broad, and will attract opinionated answers, so is likely to be closed.

There is a tool called Meteor Up (mup) which will allow you to deploy to a server such as AWS EC2 or Digital Ocean. It makes use of docker containers, so it works simply and quickly.

Galaxy is probably a bit more up market, as it is designed to be a scalable solution specifically built for Meteor. It costs a bit more, and I think you still need to host your database elsewhere

Upvotes: 1

Related Questions