me escribió:
> When using multistage, how does one control cwd in
> mongrel_cluster.yml?
>
> Or do you just end up using different mongrel_cluster files, each with
> a different cwd setting, and then setting :mongrel_conf accordingly in
> deploy.rb?
>
>
> >
>
>   
Perhaps theses taks and template help you. Normally, I put it in 
deploy.rb because are common in all stages, only change path and then 
use shared_path variable.

Tasks:
    desc "Create mongrel_cluster yaml in shared path"
    task :mongrel_cluster_yml do
      template = File.read(File.join(File.dirname(__FILE__), 
"deploy/templates", "mongrel_cluster.erb"))
      result = ERB.new(template).result(binding)
      run "mkdir -p #{shared_path}/config"
      put result, "#{shared_path}/config/mongrel_cluster.yml"
    end

    desc "Make symlink for mongrel_cluster yaml"
    task :symlink_mongrel_cluster_yml do
      run "ln -nfs #{shared_path}/config/mongrel_cluster.yml 
#{release_path}/config/mongrel_cluster.yml"
    end


Templates (config/deploy/templates/mongrel_cluster.erb):

---
user: <%= mongrel_username %>
group: <%= mongrel_group %>
cwd: <%= deploy_to %>/current
port: "<%= mongrel_port %>"
environment: production
address: 127.0.0.1
pid_file: <%= shared_path %>/log/mongrel.pid
log_file: <%= shared_path %>/log/mongrel.log
servers: <%= mongrel_servers %>

Regards

-- 
Rafael Garcia Ortega


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Deploying Rails" group.
To post to this group, send email to rubyonrails-deployment@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-deployment?hl=en
-~----------~----~----~----~------~----~------~--~---

begin:vcard
fn;quoted-printable:Rafael Garc=C3=ADa Ortega
n;quoted-printable:Garc=C3=ADa Ortega;Rafael
org:ASPgems S.L.
email;internet:[EMAIL PROTECTED]
tel;work:692686533
x-mozilla-html:FALSE
url:http://www.aspgems.com
version:2.1
end:vcard

Reply via email to