# Capistrano and mongrel\_cluster.yml

**URL:** <https://www.ruby-forum.com/t/capistrano-and-mongrel-cluster-yml/89898>\
**Category:** Deployment\
**Created:** [March 23, 2007, 4:27pm UTC](https://www.ruby-forum.com/t/capistrano-and-mongrel-cluster-yml/89898 "2007-03-23T16:27:02Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![raul](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/958977/32.png) [@raul](https://www.ruby-forum.com/u/raul)\
**Post date:** [March 23, 2007, 4:27pm UTC](https://www.ruby-forum.com/t/capistrano-and-mongrel-cluster-yml/89898/1 "2007-03-23T16:27:02Z")

</div>

Hey everyone! Hope you guys are all doing good.

I was wondering how anyone here might be handling their  
mongrel\_cluster.yml file with capistrano on multiple environments. I  
have my team, 3 of us with our own local development environment, a test  
webserver with nginx/5mongrels and a pack of live servers with  
nginx/12mongrels each. I haven’t finished my capistrano recipe yet but  
it looks to me like when I deploy it’s going to overwrite all my  
mongrel\_cluster.yml files on every machine, both test and production,  
with the same file. That would make things screwy. I want all the  
production servers to get the same yml file but the test one should be  
different.

Thoughts?

Raul

---

<div class="post-metadata">

**Author:** ![raul](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/958977/32.png) [@raul](https://www.ruby-forum.com/u/raul)\
**Post date:** [March 23, 2007, 5:59pm UTC](https://www.ruby-forum.com/t/capistrano-and-mongrel-cluster-yml/89898/2 "2007-03-23T17:59:51Z")

</div>

> production servers to get the same yml file but the test one should be  
> different.
> 
> Thoughts?

You could do something like this…

desc “Link in the production database.yml”  
task :after\_update\_code, :roles =\> :app do  
run “cp #{release\_path}/config/database.yml-production  
#{release\_path}/config/database.yml”  
end

Just alter the filenames to match your mongrel.yml’s instead of  
database.yml’s…

-philip

---

<div class="post-metadata">

**Author:** ![raul](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/958977/32.png) [@raul](https://www.ruby-forum.com/u/raul)\
**Post date:** [March 23, 2007, 6:04pm UTC](https://www.ruby-forum.com/t/capistrano-and-mongrel-cluster-yml/89898/3 "2007-03-23T18:04:51Z")

</div>

Hi Raul,

If you run:  
svn propset svn:ignore mongrel\_cluster.yml

Then mongrel\_cluster.yml will no longer be checked in/out.

- Mike

---

<div class="post-metadata">

**Author:** ![raul](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/958977/32.png) [@raul](https://www.ruby-forum.com/u/raul)\
**Post date:** [March 23, 2007, 10:22pm UTC](https://www.ruby-forum.com/t/capistrano-and-mongrel-cluster-yml/89898/4 "2007-03-23T22:22:21Z")

</div>

> > If you run:  
> > svn propset svn:ignore mongrel\_cluster.yml
> > 
> > Then mongrel\_cluster.yml will no longer be checked in/out.

Just be sure you setup an after\_deploy task to write it out from a  
tracked  
copy otherwise you’ll lose it the first time you deploy and wonder why  
you’re site won’t work…

How do I know this? Uh… heh. 🙂

---

<div class="post-metadata">

**Author:** ![raul](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/958977/32.png) [@raul](https://www.ruby-forum.com/u/raul)\
**Post date:** [March 23, 2007, 6:25pm UTC](https://www.ruby-forum.com/t/capistrano-and-mongrel-cluster-yml/89898/5 "2007-03-23T18:25:57Z")

</div>

OK that’s a great suggestion. Funny thing is, it seems simple in  
retrospect! haha

Raul

----- Original Message -----  
From: “Mike Sax” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
To: [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
Sent: Friday, March 23, 2007 10:04 AM  
Subject: [Rails-deploy] Re: capistrano and mongrel\_cluster.yml
