Skip to content

Instantly share code, notes, and snippets.

@panbanda
Forked from patte/figaro-capistrano.rb
Last active August 29, 2015 14:11
Show Gist options
  • Save panbanda/df520a8185733fb6f16e to your computer and use it in GitHub Desktop.
Save panbanda/df520a8185733fb6f16e to your computer and use it in GitHub Desktop.
Adding environment variables for figaro to Capistrano deployment.
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}/config/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}/config/application.yml #{release_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