开发者

How does Passenger, Capistrano & SVN work together

开发者 https://www.devze.com 2023-03-14 12:29 出处:网络
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 & capistr

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 subdom开发者_Go百科ain 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?


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.


Capistrano is the tool that does the deployment. It can checkout the files from svn either directly to where the deployment happens (if it has ssh access) or locally and then use ftp/sftp/scp to copy to the deployment area. Passenger is the Apache module that let Apache understand how to serve up your application once it's deployed.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号