Hi, did ever you figure out a better way to do this?
On 12 Jun, 16:54, Jamis Buck <[EMAIL PROTECTED]> wrote:
> I'd strongly recommend deploying to the same directory on each server.
> Not knowing your precise constraints, though, I'll acknowledge that
> there may well be situations where you need the deploy-to to be named
> after the server you're deploying to; in that case, I'd still deploy
> to the same directory on each server. You can then manually create
> symlinks from /var/www/domains/my.server.name -> /var/www/domains/deploy_to.
>
> You *might* be able to definedeploy_tolike this:
>
> set :deploy_to, "/var/www/domains/$CAPISTRANO:HOST$"
>
> But that's untested, and not explicitly supported, so you might be
> living on borrowed time if that happens to work.
>
> - Jamis
>
> On Jun 12, 2008, at 11:23 AM, mdeering wrote:
>
>
>
> > Here is the main meat of what I'm trying to accomplish. It is the old
> > multi-environment with a little twist from the fact I want the
> >deploy_todirectory to be set differently for each of the servers that
> > I'm deploying to not just for whatstageI have chosen. In the below
> > example if was running with the developmentstageI would want three
> > versions of the code sent out and deployed to "/var/www/domains/
> > development.example.org", "/var/www/domains/
> > control1development.example.org", "/var/www/domains/
> > control2development.example.org".
>
> > <deploy.rb>
> > set :stage, case ENV['stage']
> > when 'development':
> > role :app, 'development.example.org'
> > role :control, 'control1development.example.org',
> > 'control2development.example.org'
> > role :db, 'development.example.org'
> > role :web, 'development.example.org'
> > 'development.example.org'
> > when 'production':
> > role :app, 'example.org'
> > role :control, 'control1.example.org', 'control2.example.org'
> > role :db, 'example.org'
> > role :web, 'example.org'
> > 'example.org'
> > else
> > role :app, 'staging.example.org'
> > role :control, 'control1staging.example.org',
> > 'control2staging.example.org'
> > role :db, 'staging.example.org'
> > role :web, 'staging.example.org'
> > 'staging.example.org'
> > end
>
> > # Lazy evaluation
> > set(:deploy_to) { ”/var/www/domains/#{stage}” }
> > # What I really want here is something like this but I'm not sure how
> > to accomplish it.
> > # set(:deploy_to) {"/var/www/domains/#{the_current_server_name}"}
>
> > </deploy.rb>
>
> > With the staging and development stages I am really deploying to the
> > same server so need to generate thedeploy_tobased on the current
> > server I'm trying to deploy to to separate out the configuration,
> > logging, ect... to properly simulate and keep the control/admin as
> > close to production as possible.
>
> > I suspect there is a way to grab the current server being deployed to
> > accomplish this dynamicdeploy_tosomewhere inside one of the deploy
> > blocks but I have been unable to google up any examples of doing this.
>
> > Thanks in advance for any help,
> > Mike D.
--~--~---------~--~----~------------~-------~--~----~
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/capistrano
-~----------~----~----~----~------~----~------~--~---