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