On a slight tangent, do you also end up with different mongrel_conf
files?
If so, how do you deal with what to put in script/spin?


I'm torn because I'm now trying to figure out how to do something
like:

/usr/bin/mongrel_rails cluster::start -C /path/app_name/#{stage}/
current/config/mongrel_cluster.yml




On Jan 25, 4:10 am, "Rafael G." <[EMAIL PROTECTED]> wrote:
> I use config/deploy.rb for common things (tasks, variables,...), then in
> every stage put customized things.
> For example:
>
> == config/deploy.rb
>
> set :stages, %w(foo bar)
> set :default_stage, "foo"
> require 'capistrano/ext/multistage'
>
> set :repository,  "https://repository/trunk";
> set :user, "my_user"
>
> ...
>
> # Some common tasks
>
> == config/deploy/foo.rb
>
> role :app, "foo.host.com"
> role :web, "foo.host.com"
> role :db,  "foo.host.com", :primary => true
>
> == config/deploy/bar.rb
>
> role :app, "bar.host.com", "bar2.host.com"
> role :web, "bar.host.com"
> role :db,  "bar.host.com", :primary => true
>
> In this case. I used differents hosts in differents stages. You can do
> the same with tasks.
> Regards
>
> me escribió:
>
>
>
> > In the spirit of DRY, would it still be possible to keep things in one
> > deploy.rb and just do for the following since (so far, I think) that's
> > how each of the three deploy files would differ from each other?
>
> > set :deploy_to, "/srv/www/htdocs/#{application}/#{stages}"
> > set :mongrel_conf, "#{deploy_to}/current/config/mongrel_cluster/
> > #{stages}.yml"
>
> > On Jan 24, 9:24 am, "Rafael G." <[EMAIL PROTECTED]> wrote:
>
> >> me escribió:
>
> >>> Forgive me if this is a basic question.  I'm attempting to support
> >>> multiple-stage deployment, and I start out with:
>
> >>>  set :stages, %w(production staging qa)
> >>>  require 'capistrano/ext/multistage'
>
> >>> in my deploy.rb file.
>
> >>> But I get an error where it appears to try to find a file based on one
> >>> of the environment names:
>
> >>> $ cap qa deploy:setup
> >>>   * executing `qa'
> >>> /usr/local/lib/ruby/gems/1.8/gems/capistrano-2.1.0/lib/capistrano/
> >>> configuration/loading.rb:184:in `find_file_in_load_path': no such file
> >>> to load -- config/deploy/qa (LoadError)
>
> >>> Does this mean I need to have the following files, as well?
> >>> config/deploy/qa.rb
> >>> config/deploy/production.rb
> >>> config/deploy/staging.rb
>
> >> Yes :)
>
> >> --
> >> Rafael Garcia Ortega
>
> >>  rgo.vcf
> >> 1KDownload
>
> --
> Rafael Garcia Ortega
>
>  rgo.vcf
> 1KDownload
--~--~---------~--~----~------------~-------~--~----~
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/capistrano
-~----------~----~----~----~------~----~------~--~---

Reply via email to