Thanks!  This might work for me!

On Jan 23, 5:30 pm, "Rafael G." <[EMAIL PROTECTED]> wrote:
> 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
>
>  rgo.vcf
> 1KDownload
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to