good_evening
good_evening

Reputation: 21739

What's the easiest way to deploy Meteor app?

I've spent whole day and without success. I've tried Heroku with https://github.com/jordansissel/heroku-buildpack-meteor, but it gives an error and logs doesn't give any good info. I want a free service with the ability to scale once the app gets more traffic. I just want to write as few lines as possible, or just drop a bundle. It shouldn't be so difficult. Thank you.

Upvotes: 1

Views: 539

Answers (5)

It seems an old question by now but in case anybody stumbles upon here,

after I made my research and tried lots of different things, I ended up with the process below which includes amazing phusion passenger and I'm doing it for many projects of mine so far.

1 - Install meteor on server by doing

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

2 - Install Phusion Passenger by following the documents here

3 - Build your app locally (it is important to add meteor packages)

4 - Delete .meteor/local/build and .meteor/local/cordova-build (don't delete db if you want to keep your local db)

5 - Using ftp, create a folder on your server and upload all the files including .meteor folder

6 - Run phusion passenger standalone by doing

sudo -E passenger start --port 80 --user root --environment production --daemonize --sticky-sessions

Of course, you should change the variables before doing that. You can use the last 4 steps for every app you have. If you want to publish a cordova app just use your domain with selected port instead of yourapp.meteor.com

Since meteor is reloading itself automatically until you say not to, you can just upload the new client files to server and wait the reload when you want to make a quick change. If the change is on the server, stop the passenger with

passenger stop --port 80

upload your files and run passenger again.

I hope this helps someone out there.

Best

Upvotes: 0

fuzzybabybunny
fuzzybabybunny

Reputation: 5254

I made a few tutorial vids for using Meteor Up with Amazon EC2. You can start out with the free EC2 Micro Tier.

Setting up EC2

https://www.youtube.com/watch?v=OXdPdSekVtg&list=UUs2gDoWu9gHHR0aOklT3nvg

EC2 SSH

https://www.youtube.com/watch?v=K-IRgEge6jA&list=UUs2gDoWu9gHHR0aOklT3nvg

Meteor Deployment onto EC2

https://www.youtube.com/watch?v=Lyyh2fkXovo&list=UUs2gDoWu9gHHR0aOklT3nvg

Upvotes: 0

Kuba Wyrobek
Kuba Wyrobek

Reputation: 5273

IMO The easiest way to deploy meteor app for production is to use meteor-up and your own server (DigitalOcean, Linode,...) .

meteor-up setups server for you (install nodejs, mongodb, etc) and give you easy way to deploy:

mup deploy

You can have server good enough for start for only 5 $/month.

Upvotes: 2

James M. Lay
James M. Lay

Reputation: 2470

$ meteor deploy myapp.meteor.com

Where myapp is a not-taken subdomain of your choice.

From the documentation:

You can also deploy to your own domain. Just set up the hostname you want to use as a CNAME to origin.meteor.com, then deploy to that name.

$ meteor deploy www.myapp.com

If you want scalable, it's not going to be free (to my knowlege). But you can use AWS, linode, or pretty much any of the cloud services. Just install meteor on your host, and run this command from the project directory:

$ cd my_project_directory && meteor

If you want it to run in the background:

$ cd my_project_directory && meteor &>.log &
$ disown %1 // or whatever job number meteor runs as.

Upvotes: 1

Geoffrey Booth
Geoffrey Booth

Reputation: 7366

It doesn’t get much simpler than meteor deploy.

Upvotes: 1

Related Questions