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.
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, …)
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).
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 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