I have two config-files
/app/config/database.yml
and
/app/config/userconfig.yml
i don\'t want to put the data
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
:
set :linked_files, %w{
app/config/database.yml
app/config/userconfig.yml
}
Related: Capistrano - How to put files in the shared folder?
You should place your config files in
/path/to/deployed_app/shared
Then in a capistrano task, sym link to those files:
namespace :deploy do
task :symlink_shared do
run "ln -s #{shared_path}/database.yml #{release_path}/config/"
end
end
before "deploy:restart", "deploy:symlink_shared"