Is it hard to deploy meteor app on purpose?

Hi, I’m newbie. Before I start learning meteor, I went over few tutorials for nodejs + express. I also seccessfuly deploy simple apps on the internet.

Then I found blog posts how cool and simple Meteor js is, so I give it a shot and start learning Meteor. I saw benefits immediately. Now I have a problem, nobody said how hard is to deploy meteor app on the server in the production.

If I would know how hard it is on the first place, I would never start learning Meteor. But since I spent alot of time learning meteor, I don’t wanna give up.

Samse like deploying meteor app is hard on purpose, to force people using Meteor Hosting?

Meteor Hosting is to expensive for my needs. Now I’m looking forward for alternatives where deploying Meteor app is not super hard.

1 Like

meteor up is super easy to use https://github.com/zodern/meteor-up given that you can create at least an empty virtual machine somewhere (digitalocean, exoscale, …)

1 Like

I would also recommend meteor-up for small projects without any bigger traffic. But if your project grows, you may have other requirements. For example, if you want to scale between your CPUs on the server, you have to use another tool (PM2 + NGINX + STICKY SESSIONS).

2 Likes

oh…does it work now? I’ve tried deploying with all tools it’s always been really tough. Just came on the forum here to ask same question.

mup was working great before but in latest versions I cannot get the fileupload working in my app

1 Like

I bought server on DigitalOcean, created new droplet, new user, install node and mup on local computer.
In my test project on my local computer I created .deploy folder and run command "mup init"
in mup.js I replaced host, username, password and ROOT_URL.

When I run mup setup I got this error:

Started TaskList: Setup Docker
[234.345.23.132] - Setup Docker
[234.345.23.132] x Setup Docker: FAILED

    -----------------------------------STDERR---------------------------------
    bash: line 7: docker: command not found
    sudo: no tty present and no askpass program specified
    sudo: no tty present and no askpass program specified
    sudo: no tty present and no askpass program specified
    sudo: no tty present and no askpass program specified
    -----------------------------------STDOUT---------------------------------

Then I created ssh key and in mup.js I replaced ssh location with location of my id_rsa.pub and comment out password field. Now I got this error:

Started TaskList: Setup Docker
[234.345.23.13] - Setup Docker
Error privateKey value does not contain a (valid) private key

This is weird because ssh key should work because I can access without password.

I got it online!

For now I can only deploy with username and password, I dont know why id_rsa.pub is not working.

Setup Docker: FAILED because I had to disable password for sudo commands.
If anyone have the same problem, you have to run this comman:

$ sudo visudo

and add this line:

john ALL=(ALL) NOPASSWD: ALL

Replace john with your username.

Now I need to find out how to do it with id_rsa.pub insted of password.

Deploying to Galaxy is super easy - if a bit expensive.

Zeit’s ▲now also looks pretty easy. There is a meteor package too.

1 Like

I believe Galaxy is very good solution, but way too expensive for beginners and learning purpose. You also need to host mongodb somewhere else and this is extra $15+ per month.

I have one more problem, when I login with terminal, I have to cd … 2 times to see opt folder. I assume I have to deploy meteor app in /home/myusername/ and I’m not sure how to modify mup.js to fix this:

WARNING: The output directory is under your source tree.
Your generated files may get interpreted as source code!
Consider building into a different directory instead
meteor build …/output

You need to make a .deploy folder and run mup init inside that, then specify the app path relative to this file then run mup deploy.

Sometimes you have to stand on your head, go in and out of the room 3 times, ask it nicely and restart. But in theory it works.

Is it hard to deploy meteor app on purpose?

Not as hard as it is to deploy them accidentally.

5 Likes

Ctrl-F ‘accidentally’