Search code examples
ruby-on-railscapistrano

Capistrano deploy through chain of servers


I need to deploy a Rails application via capistrano to a server on a remote intranet. For example, if I were to ssh into the target server it would look like:

localhost$ ssh server1
server1$ ssh server2

Whats the best way of doing this?

Thanks in advance.


Solution

  • Capistrano makes this really easy. Just use

    set :gateway, "user@server1:port"
    

    in your config/deploy.rb.