Skip to content

Instantly share code, notes, and snippets.

@joffilyfe
Forked from patte/figaro-capistrano.rb
Created March 23, 2017 22:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joffilyfe/6cd19807f2093e5c99eb5010b74c34b8 to your computer and use it in GitHub Desktop.
Save joffilyfe/6cd19807f2093e5c99eb5010b74c34b8 to your computer and use it in GitHub Desktop.
namespace :figaro do
desc "SCP transfer figaro configuration to the shared folder"
task :setup do
on roles(:app) do
upload! "config/application.yml", "#{shared_path}/application.yml", via: :scp
end
end
desc "Symlink application.yml to the release path"
task :symlink do
on roles(:app) do
execute "ln -sf #{shared_path}/application.yml #{current_path}/config/application.yml"
end
end
end
after "deploy:started", "figaro:setup"
after "deploy:symlink:release", "figaro:symlink"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment