WebFaction
Community site: login faq
1
2

I'd like to use Meteor on Webfaction servers. Note: that's Meteor the single-page web application framework, not Meteor the Perl HTTP server.

Is this possible with Webfaction?

asked 22 Oct '12, 05:30

AnnaPS
10711020
accept rate: 100%


actually... this is working better for me... https://github.com/mogga/webfaction-meteor

permanent link

answered 14 Dec '14, 11:59

mogga
213
accept rate: 0%

This is based on node and mongodb, so you shouldn't have any issues running it.

Meteor's guide provides an installation script, but it needs root privileges to finish.

That said, I was able to create a sample app by creating three "Custom app (listening on port)" applications, named for example 'meteor1' to 'meteor3' and assign the first one on a port. Please note those ports need to be in a sequence, so you need to open a support ticket for that.

I've then use the following commads:

cd ~/webapps/meteor1
curl --silent https://d3sqy0vbqsdhku.cloudfront.net/meteor-package-Linux-x86_64-0.5.0.tar.gz | tar xz --strip 1
./bin/meteor create myapp
cd myapp
../bin/meteor -p YOUR_FIRST_PORT

But I think the best approach to run a meteor project on our servers would be the one described at their Deploying page, especially on the 'Running on your own infrastructure' section. Like that, you can create your app locally and then bundle and upload it to our server, where you will be running your own node.js and mongodb instances.

permanent link

answered 22 Oct '12, 08:36

iliasr ♦♦
2.0k14
accept rate: 35%

Thanks! I'll follow the "Running on your own infrastructure" instructions. How would you recommend I handle this in terms of creating webfaction apps for the meteor bundle, and for installing mongodb and node?

(22 Oct '12, 16:41) AnnaPS

What I mean is this: the Webfaction instructions for installing Mongo http://docs.webfaction.com/software/mongodb.html suggest creating an app just for Mongo - so do the Node instructions for Node: http://community.webfaction.com/questions/4888/install-nodejs-with-express-framework -- should I create three separate apps for Mongo, Node and Meteor, or one app to rule (hold) them all?

(22 Oct '12, 16:43) AnnaPS

You'll need three separate apps, since each app you create reserves a port number.

(22 Oct '12, 17:13) seanf

Is there an order to which applications you need to install meteor, node, and mongo? E.g. custom_app1 - meteor, custom_app2 - node, custom_app3 - mongo? Thanks.

(23 Dec '13, 14:03) bsbechtel

No it should not matter, but I would recommend: Mongo, Node and then Meteor.

(23 Dec '13, 15:08) timg ♦♦

I was able to get the meteor app up and running, but not persistently (when I logged out of SSH, the app shut down). I tried bundling the app per the docs, but when I try to start node, it does not see any of the assigned ports. Any suggestions?

(23 Dec '13, 23:54) bsbechtel

I would suggest running the application in the background automatically using a watchdog script like this one. If the application isn't running, then node will see the ports as closed.

(24 Dec '13, 01:04) ryans ♦♦

Sorry, I'm new to shell scripting and cron jobs. Can you provide more detail on what exactly I need to do? Thanks.

(24 Dec '13, 11:43) bsbechtel
  1. Copy the script in our doc to a file, and modify the commands and paths in the script to whatever you need them to be for your application.
  2. Upload the script to your home directory on your WF server.
  3. Make the script executable: chmod u+x ~/path/to/your/script
  4. Follow the instructions in our documentation for creating a cron job that executes the script.

You might also try running the meteor command through nohup (which detaches it from your terminal) as a background process, eg: nohup ../bin/meteor -p YOUR_FIRST_PORT & - that way, it will continue to run when you log out of your session.

(24 Dec '13, 13:45) seanf

I was able to get it consistently running using nohup. I also created the watchdog script as a backup w/ the cron job. Is there any good way to test the cron job to make sure it's working properly? Thanks.

(26 Dec '13, 17:01) bsbechtel

If you've configured the cron job according to our example, then any errors produced by the job will be logged in$HOME/cron/watchdog.log - so, just let it run according to its schedule, and check the log for any problems.

(26 Dec '13, 17:11) seanf
showing 5 of 11 show 6 more comments

Is there an order to which applications you need to install meteor, node, and mongo? E.g. custom_app1 - meteor, custom_app2 - node, custom_app3 - mongo? Thanks.

permanent link

answered 23 Dec '13, 14:02

bsbechtel
5826
accept rate: 50%

Is there an order to which applications you need to install meteor, node, and mongo? E.g. custom_app1 - meteor, custom_app2 - node, custom_app3 - mongo? Thanks.

permanent link

answered 23 Dec '13, 14:02

bsbechtel
5826
accept rate: 50%

This is an old post but since I've recently worked through how to get this working myself from start to finish I thought worth sharing... The following github gist is a python script that should be self-explanatory:

https://gist.github.com/mogga/1d038a31e5d998bbcf37

Please submit a pull request if you can improve on it.

permanent link

answered 16 Nov '14, 11:02

mogga
213
accept rate: 0%

That gist no longer exists. Is there a step by step guide for this? I tried https://github.com/robmoggach/webfaction-meteor but then I get

It looks like you are trying to access MongoDB over HTTP on the native driver port.

so no idea on what I did wrong

(11 Oct '15, 06:49) TonyKirke

That error message doesn't provide a lot of detail, but it sounds like you might have configured mongodb to listen on the port which Nginx is forwarding HTTP requests to. If that's the case, you probably have the ports backwards.

(11 Oct '15, 07:39) ryans ♦♦
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×27
×13

question asked: 22 Oct '12, 05:30

question was seen: 5,663 times

last updated: 11 Oct '15, 07:39

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM