Capistrano: Create symlink for the database config YML file

/ Published in: Rails
Save to your folder(s)

In this instance, used as an after-deploy hook to create a symlink to a shared db config file

Copy this code and paste it in your HTML
  1. desc "Make symlink for database yaml"
  2. task :symlink do
  3. run "ln -nfs #{shared_path}/config/database.yml #{release_path}/config/database.yml"
  4. end

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.