Welcome Guest | Login

capistrano & SSH/svn quirks

ello,

I'm trying to deploy my application over Capistrano. And I'm having a bit of trouble. First off I'm not entirely sure how to deploy it so that it runs automagically on mongrel. the trunk should run on OS X and windows as well, so :) I made a separate ".htacces.online" file that I have put in the shared folder in capistrano. Is that a good idea or not? And how would that script run?

desc "make mongrel ready & database credentials"
task :after_update_code do
 run <<-CMD
   ln -nfs #{deploy_to}/#{shared_dir}/config/database.yml #{release_path}/config/database.yml
 CMD
 run <<-CMD
   ln -nfs #{deploy_to}/#{shared_dir}/public/.htaccess #{release_path}/public/.htaccess
 CMD
 run "chmod a+x #{release_path}/public/dispatch.fcgi"
end

Something like this ? Or do I need to remove .htacces first? Another thing that I'm wondering about is: I have 2 folders in public/ that need to be written to by the program. The app writes images and files in there. Will these files get transfered every time I deploy my app? Or do I have to move those via another action? And ... I know it's a stupid question, but what permissions should these folders have :x lol. Just asking to be on the safe side.

Anyway, At first cap setup refused to run but that was due to the fact that I needed a public/private SSH key I think. It started working after this. I tried SSH keys since I wanted to use svnX to access the online repository. Now, I get the tty error in svnX so I'll need to have that line commented out as in this post I presume. Before that, it wouldn't even connect at all.

Hopefully I won't be afraid of capistrano anymore after one of you guru's show me the light :D

2007-01-30 09:38 AM

Allright ... it's working wiej :) But I'm still having some problems.
I can't svn up in my current folder. It says something about it expecting log to be a directory. So I'll clear the log folder from my svn and that should do the trick ?
Also, I'm still not sure about the uploadeable files. They should reside in public/pictures and public/downloads. Would it be OK if I symlinked these 2 folders to 2 folders in the shared directory ?

And I still need the tty thing fixed. I'll just mail about that then.

2007-01-31 09:12 AM

Yeah - let us know about the tty issue at support.  Let me know if the log dir clear works...you certainly don't need those in your svn.

2007-01-31 09:17 AM


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