Search code examples
ruby-on-railspassengercapistranodreamhostweb-deployment

How does Passenger, Capistrano & SVN work together


I'm planning to create a website on dreamhost using Ruby on Rails. While reading through the wiki on dreamhost, I realized that I have to transfer my local files to the server using svn & capistrano. And Passenger is used by dreamhost to deploy my application.

Can anyone explain the workflow invovled in this?

More details: As per the details on the dreamhost wiki page on svn, I created a subdomain for the svn repository at http://svn.mywebsite.com/project . I can commit my local changes to this location. But I'm not sure how the files at this directory are moved over to the main website .. i.e. http://www.mywebsite.com Is it done by Capistrano or Passenger?


Solution

  • Passenger is the module loaded by Apache to run and display your Rack based applications which include Rails. Capistrano is used to remotely run commands to checkout and deploy your application from svn. SVN is obviously used to store and version your application. The workflow is as follows:

    1. Write code
    2. Check-in to svn
    3. Deploy with Capistrano
    4. Capistrano checks code out of svn into a folder which Passenger is configured to watch.
    5. Passenger notices the changes and reloads your application.