I have two config-files
/app/config/database.yml
and
/app/config/userconfig.yml
i don't want to put the database credentials and userconfig in the svn-repository, so i have database.yml.dist and userconfig.yml.dist checked in.
What is the best way to get copys of the dist-files in the shared-directory when deploying the app for the first time?
For later deploys i'll link to them from /app/current/config
You should place your config files in
Then in a capistrano task, sym link to those files:
In Capistrano v3, you can use a task called
deploy:symlink:shared
.Provide a list of files you placed in the shared directory, so Capistrano knows which files to symlink when the task is run. This is typically done in
deploy.rb
:Related: Capistrano - How to put files in the shared folder?