2011-01-27 94 views
5

我需要通过capistrano将Rails应用程序部署到远程Intranet上的服务器。例如,如果我要ssh进入目标服务器,它看起来像:通过服务器链部署Capistrano

localhost$ ssh server1 
server1$ ssh server2 

这样做的最佳方式是什么?

在此先感谢。

回答

5

Capistrano使这非常简单。只需使用

set :gateway, "[email protected]:port" 

在您的config/deploy.rb中。

2

我会建议使用:

set :ssh_options, { :forward_agent => true } 
set :gateway, "[email protected]:port"