Forum: Rails deployment capistrano and mongrel_cluster.yml

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
8f977c0870d57e52e488dc3546fb7f24?d=identicon&s=25 Raul (Guest)
on 2007-03-23 16:27
(Received via mailing list)
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
2f9a03aa0fcfe945229cb6126eda2cb2?d=identicon&s=25 Philip Hallstrom (Guest)
on 2007-03-23 17:59
(Received via mailing list)
> 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
2e8a8696351166c63ac462f780ec3b5c?d=identicon&s=25 Mike Sax (Guest)
on 2007-03-23 18:04
(Received via mailing list)
Hi Raul,

If you run:
    svn propset svn:ignore mongrel_cluster.yml

Then mongrel_cluster.yml will no longer be checked in/out.

- Mike
8f977c0870d57e52e488dc3546fb7f24?d=identicon&s=25 Raul (Guest)
on 2007-03-23 18:25
(Received via mailing list)
OK that's a great suggestion.  Funny thing is, it seems simple in
retrospect!  haha

Raul


----- Original Message -----
From: "Mike Sax" <mike@sax.net>
To: <rubyonrails-deployment@googlegroups.com>
Sent: Friday, March 23, 2007 10:04 AM
Subject: [Rails-deploy] Re: capistrano and mongrel_cluster.yml
2f9a03aa0fcfe945229cb6126eda2cb2?d=identicon&s=25 Philip Hallstrom (Guest)
on 2007-03-23 22:22
(Received via mailing list)
>>
>> 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. :)
This topic is locked and can not be replied to.