Skip to content
This repository has been archived by the owner on Mar 3, 2020. It is now read-only.

Commit

Permalink
Migrate database and restart application server on capistrano deploym…
Browse files Browse the repository at this point in the history
…ent again.
  • Loading branch information
nning committed Feb 4, 2014
1 parent 69ebbcb commit d9c227e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 16 deletions.
15 changes: 0 additions & 15 deletions config/deploy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,3 @@
set :linked_dirs, %w[bin log tmp/pids tmp/cache tmp/sockets vendor/bundle public/system]

set :keep_releases, 5


namespace :deploy do

desc 'Restart application'
task :restart do
on roles :app, in: :sequence, wait: 5 do
execute :touch, release_path.join('tmp/restart.txt')
end
end

after 'deploy:publishing', 'deploy:restart'
after :finishing, 'deploy:cleanup'

end
2 changes: 1 addition & 1 deletion config/deploy/production.rb
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
set :stage, :production
server fetch(:hostname), roles: [:web, :app], user: ENV['USER']
server fetch(:hostname), roles: [:web, :app, :db], user: ENV['USER']
13 changes: 13 additions & 0 deletions lib/capistrano/tasks/deploy.rake
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
namespace :deploy do

desc 'Restart application'
task :restart do
on roles :app, in: :sequence, wait: 5 do
execute :touch, release_path.join('tmp/restart.txt')
end
end

after 'deploy:publishing', 'deploy:restart'
after :finishing, 'deploy:cleanup'

end

0 comments on commit d9c227e

Please sign in to comment.