Role Settings with Capistrano

I am currently using a multi-stage extension, but at each stage I have a role that requires a different: user and: deploy_to.

Example deploy / production.rb:

role :web, 'myhost1' role :queue, 'myhost2' 

Both servers need to be released, but in the role: web is used /var/www/html where: queue uses /home/username/path/to/releases , and both use a different SSH user.

I also have an internship phase and qa configured similarly (both have: network roles and: queue on different servers).

How to set these parameters for specific roles?

+4
source share
1 answer

you simply specify the role parameters as a hash argument to the role:

 role :web, 'myhost1', { :user => 'bill', :deploy_to => '/var/www/html' } 

for more flexibility try https://github.com/capistrano/capistrano/wiki/2.x-Multistage-Extension

+2
source

All Articles