forked from e621ng/e621ng
move newrelic + deploytags gem to production env, rename cap tasks to .rake
This commit is contained in:
parent
4eb0a64135
commit
9a75a05c25
2
Capfile
2
Capfile
@ -13,6 +13,6 @@ require 'capistrano/deploytags'
|
||||
require 'new_relic/recipes'
|
||||
|
||||
# Load custom tasks from `lib/capistrano/tasks` if you have any defined
|
||||
Dir.glob('lib/capistrano/tasks/*.cap').each { |r| import r }
|
||||
Dir.glob('lib/capistrano/tasks/*.rake').each { |r| import r }
|
||||
|
||||
after "deploy:updated", "newrelic:notice_deployment"
|
||||
|
4
Gemfile
4
Gemfile
@ -68,12 +68,12 @@ end
|
||||
|
||||
group :production do
|
||||
gem 'unicorn-worker-killer'
|
||||
gem 'newrelic_rpm'
|
||||
gem 'gctools', :platforms => :ruby
|
||||
gem 'capistrano-deploytags', '~> 1.0.0', require: false
|
||||
end
|
||||
|
||||
group :development do
|
||||
gem 'ruby-prof'
|
||||
gem 'newrelic_rpm', require: false
|
||||
gem 'capistrano-deploytags', '~> 1.0.0', require: false
|
||||
# gem 'sql-logging'
|
||||
end
|
||||
|
@ -3,6 +3,7 @@ namespace :unicorn do
|
||||
task :terminate do
|
||||
on roles(:app) do
|
||||
execute "[[ -n $(pgrep -f unicorn) ]] && pgrep -f unicorn | xargs kill -SIGTERM"
|
||||
sleep(5)
|
||||
end
|
||||
end
|
||||
|
||||
@ -14,7 +15,6 @@ namespace :unicorn do
|
||||
end
|
||||
end
|
||||
|
||||
after "deploy:published", "unicorn:stop"
|
||||
after "deploy:published", "unicorn:terminate"
|
||||
after "deploy:published", "unicorn:kill"
|
||||
after "deploy:published", "unicorn:start"
|
Loading…
Reference in New Issue
Block a user