views:

18

answers:

0

I have searched and searched and asked a question already and have not received a clear answer.

I have the following deploy script (snippet):

set :application, "testapplication" 
set :repository,  "ssh://domain.com//srv/hg/#{application}" 
set :scm, :mercurial

set :deploy_to, "/srv/www/#{application}" 

role :web, "domain1.com", "domain2.com"
role :app, "domain1.com", "domain2.com"
role :db,  "domain1.com", :primary => true, :norelease => true
role :db,  "domain2.com", :norelease => true

As you see, I have set deploy_to to a specific path. And, I also have specified multiple web servers. However, each web server should have a different deployment path.

I want to be able to run "cap deploy" and deploy to all hosts in one shot. I am NOT trying to deploy to staging and then to production. This is all production.

My question is: how exactly do I specify a path per server? I have read the "Roles" documentation for Capistrano, and this is unclear. Can someone please post a deploy file example? I have read the documentation, and it is unclear how to do this.

Does anyone know? Am I crazy? Am I thinking of this wrong or something? No answers anywhere online. Nowhere. Nothing. Please, someone help.