2 Answers
2

Currently, I keep a shared folder called shared that lives outside of my deply_to dirs. I keep my database.yml and other config files there and have a hook in cap to cp those over during deployment. Here is my simple cap task for doing the copy:

after "deploy:update_code","deploy:config_symlink"
namespace :deploy do
task :config_symlink do
run "cp #{shared_path}/../../shared/database.yml #{release_path}/config/database.yml"
end
end

This is fairly common, and can keep some production passwords out of source control. I'm not sure why you're backing out of shared_path, though. And I would ln rather than cp.
–
Austin TaylorApr 26 '11 at 4:47

1

I back out of shared because shared is at the deploy_dir level. I usually have multiple installs of the app such as beta and prod which use the same config. If you only have one deployment then yah you can just use the shared_path dir of the deploy target.
–
Jake DempseyApr 28 '11 at 14:32

@JakeDempsey And how you do it if the differents instal app have differents config files?
–
montellsMar 6 '14 at 14:30