Files
grecia/config/deploy.rb
2015-08-07 12:17:18 +02:00

38 lines
881 B
Ruby

# config valid only for current version of Capistrano
lock '3.4.0'
def deploysecret(key)
@deploy_secrets_yml ||= YAML.load_file('config/deploy-secrets.yml')[fetch(:stage).to_s]
@deploy_secrets_yml[key.to_s]
end
set :rails_env, fetch(:stage)
set :application, 'participacion'
set :repo_url, 'git@github.com:AyuntamientoMadrid/participacion.git'
set :scm, :git
set :revision, `git rev-parse --short #{fetch(:branch)}`.strip
set :log_level, :info
set :linked_files, %w{config/database.yml config/secrets.yml}
set :linked_dirs, %w{log tmp public/system public/assets}
set :keep_releases, 5
set :local_user, ENV['USER']
namespace :deploy do
after :restart, :clear_cache do
on roles(:web), in: :groups, limit: 3, wait: 10 do
# Here we can do anything such as:
# within release_path do
# execute :rake, 'cache:clear'
# end
end
end
end