2011-01-27 92 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"