This repository has been archived by the owner on Mar 3, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate database and restart application server on capistrano deploym…
…ent again.
- Loading branch information
Showing
3 changed files
with
14 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |