fixes capistrano unicorn restart task
This commit is contained in:
@@ -6,11 +6,14 @@ def deploysecret(key)
|
||||
@deploy_secrets_yml[key.to_s]
|
||||
end
|
||||
|
||||
|
||||
set :rails_env, fetch(:stage)
|
||||
set :rvm_ruby_version, '2.2.2'
|
||||
set :rvm_type, :user
|
||||
|
||||
set :application, 'participacion'
|
||||
set :full_app_name, deploysecret(:full_app_name)
|
||||
|
||||
set :server_name, deploysecret(:server_name)
|
||||
#set :repo_url, 'git@github.com:AyuntamientoMadrid/participacion.git'
|
||||
# If ssh access is restricted, probably you need to use https access
|
||||
|
||||
@@ -3,7 +3,7 @@ namespace :deploy do
|
||||
%w(start stop force-stop restart upgrade reopen-logs).each do |command|
|
||||
task command.to_sym do
|
||||
on roles(:app), in: :sequence, wait: 5 do
|
||||
sudo "/etc/init.d/unicorn_#{fetch(:full_app_name)} #{command}"
|
||||
execute "/etc/init.d/unicorn_#{fetch(:full_app_name)} #{command}"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user