Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hosting a Rails Application on Linode

I'm planning to host a Rails application on Linode, but I'm still unsure about the requirements and process of deploying. I'm only getting the 512 plan since I'm expecting relative small traffic for the site.

My question is, do I need to get a repository such as Github to store my code? I'm also a bit concerned about how long it takes to set the server up and the deployment process. I've browsed through the Linode library but I'm not entirely clear on how to deploy Rails apps. I'm planning to use nginx as my server and passenger for deploying. Does anyone know where I can learn to deploy Rails applications on a Linode machine? A step-by-step tutorial with detailed explanation would be great. Thanks!

like image 491
gerky Avatar asked Aug 07 '12 03:08

gerky


2 Answers

I've deployed a couple of simple applications on Linode and found their documentation to be excellent. In particular they have step-by-step tutorials tailored to specific environments. For example, in my case (like you) I wanted to use nginx, and I was using Ubuntu 10.04, so I followed this guide:

http://library.linode.com/frameworks/ruby-on-rails-nginx/ubuntu-10.04-lucid

If it's your first time setting up on a VPS there will be some hurdles certainly, but I found the experience to be very rewarding.

Regarding hosting your code, you have a number of options, but keep in mind that this is really a separate issue from deploying your app. You deploy your app on linode, but you don't have to host your code there, although you certainly can.

In general terms, if you're okay with making your code open, then certainly github is a good choice. If you want to keep the code private but still have access online (rather than just on one computer), you can take advantage of your linode machine and host your code there.

If you will have a number of other people contributing to the codebase, you might consider setting up gitosis or gitolite, which make it easy to do this. Alternatively if you will be the main user contributing to the codebase, you can setup a simpler configuration through HTTP, explained here: http://dev.bazingaweb.fr/2011/02/23/how-to-set-up-git-over-http.html

Linode also has documentation on setting up a remote git repository: https://library.linode.com/linux-tools/version-control/git

If you're choosing between gitosis and gitolite, I'd go with gitolite since gitosis appears to have been abandoned and is no longer being actively maintained.

Other references on deploying on linode:

  • http://infinite-sushi.com/2011/01/deploying-a-rails-app-to-a-linode-box/
  • http://blog.chris-spencer.co.uk/from-zero-to-git-deployment-on-linode
like image 54
Chris Salzberg Avatar answered Sep 22 '22 00:09

Chris Salzberg


Ryan Bates has a great videocast on deploying Rails apps to... Linode! Today's your lucky day :) Grab some popcorn and enjoy: http://railscasts.com/episodes/335-deploying-to-a-vps

like image 40
David Lesches Avatar answered Sep 21 '22 00:09

David Lesches