简体   繁体   English

乘客,Capistrano和SVN如何合作

[英]How does Passenger, Capistrano & SVN work together

I'm planning to create a website on dreamhost using Ruby on Rails. 我打算使用Ruby on Rails在dreamhost上创建一个网站。 While reading through the wiki on dreamhost, I realized that I have to transfer my local files to the server using svn & capistrano. 阅读Dreamhost上的Wiki时,我意识到我必须使用svn和capistrano将本地文件传输到服务器。 And Passenger is used by dreamhost to deploy my application. Dreamhost使用Passenger来部署我的应用程序。

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 . 更多详细信息:根据svn上dreamhost Wiki页面上的详细信息,我在http://svn.mywebsite.com/project上为svn存储库创建了一个子域。 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 .. ie http://www.mywebsite.com Is it done by Capistrano or Passenger? 但是我不确定该目录下的文件如何移至主网站..即http://www.mywebsite.com是由Capistrano还是Passenger进行的?

Passenger is the module loaded by Apache to run and display your Rack based applications which include Rails. 乘客是Apache加载的模块,用于运行和显示基于Rails的应用程序,其中包括Rails。 Capistrano is used to remotely run commands to checkout and deploy your application from svn. Capistrano用于远程运行命令以从svn签出并部署您的应用程序。 SVN is obviously used to store and version your application. SVN显然用于存储和版本化您的应用程序。 The workflow is as follows: 工作流程如下:

  1. Write code 写代码
  2. Check-in to svn 签到SVN
  3. Deploy with Capistrano 与Capistrano一起部署
  4. Capistrano checks code out of svn into a folder which Passenger is configured to watch. Capistrano将svn中的代码检出到配置为要查看乘客的文件夹中。
  5. Passenger notices the changes and reloads your application. 乘客注意到更改并重新加载您的应用程序。

Capistrano is the tool that does the deployment. Capistrano是执行部署的工具。 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. 它可以直接从svn检出文件,也可以从本地检出文件(如果有ssh访问权限),也可以在本地检出文件,然后使用ftp / sftp / scp复制到部署区域。 Passenger is the Apache module that let Apache understand how to serve up your application once it's deployed. 乘客是Apache模块,可让Apache理解在部署应用程序后如何为其提供服务。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM