Welcome Guest | Login

Capistrano deploying to "releases" directory

Hello,

I got Subversion and Capistrano working, but when I do 'cap deploy:cold' to update my live app from the repository, Capistrano copies the newest version into a folder called "releases" inside my project folder and runs it from there.  Every time I run 'cap deploy:cold', a new release is made and my app is just copied over and over.

Instead of the app being copied to:
/home/username/project

each time, it's copied to:
/home/username/project/releases/date1
/home/username/project/releases/date2
/home/username/project/releases/date3 etc...

Is there a way to make Capistrano deploy the app to the regular project directory and overwrite the old version each time?

Thanks!

2008-04-30 07:12 AM

Actually, now that I see why releases is there, I don't mind it.  You can do 'cap deploy:rollback' if there is an error, and 'cap deploy:cleanup' to get rid of old releases.  You can also set ':keep_releases' in deploy.rb to specify how many releases should stay after a cleanup.

I still have an issue though, which was my initial concern:  in my app's public/images folder, I have a directory that contains a few thousand images.  The images themselves are not edited, the folder is simply added to, so the file size is pretty significant (it will reach a few gigs in size soon enough).  It seems senseless to copy this through every release.  Is there a way to somehow not have that folder check in/out with every commit/checkout (svn ignore?), but still be available to each release?

2008-04-30 08:39 AM

Well.. I would recommend you to have a look into the following link .
http://subversion.tigris.org/faq.html#ignore-commit

Also the best method I can think will be to put the directory "Images" in a static location in your account and sym-link this to the necessary location in your "releases" directory.

I am not very sure about how this will work..But you can give it a try.

2008-04-30 09:27 AM

Regards,
Rahul

Hello Guest! In order to post you must be an active client with us, please log in or sign up.