-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:AbleTech/easy-deployment
- Loading branch information
Showing
6 changed files
with
105 additions
and
15 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,5 +1,5 @@ | ||
module Easy | ||
module Deployment | ||
VERSION = "0.0.7" | ||
VERSION = "0.0.9" | ||
end | ||
end |
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,20 @@ | ||
# Define some defaults for capistrano deploys. | ||
# To load this capistrano configuraiton, require 'easy/deployment/apache' from deploy.rb | ||
|
||
Capistrano::Configuration.instance(:must_exist).load do | ||
namespace :apache do | ||
desc "Configure this site & Reload the apache configuration" | ||
task :configure, :roles => :app, :except => { :no_release => true } do | ||
run "cp -f #{current_path}/config/deploy/#{stage}/apache/* /etc/apache2/sites-enabled/" | ||
end | ||
|
||
[:stop, :start, :restart].each do |action| | ||
desc "#{action.to_s.capitalize} Apache" | ||
task action, :roles => :web do | ||
run "sudo apache2ctl #{action.to_s}" | ||
end | ||
end | ||
end | ||
|
||
after 'apache:configure', 'apache:restart' | ||
end |
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,11 +1,9 @@ | ||
# To load this capistrano configuration, require 'easy/deployment/logrotate' from deploy.rb | ||
Capistrano::Configuration.instance(:must_exist).load do | ||
namespace :easy do | ||
namespace :logrotate do | ||
desc "Copies the application logrotate file into /etc/logrotate.d" | ||
task :setup, :except => { :no_release => true } do | ||
run "cp #{current_path}/config/deploy/#{stage}/logrotate.conf /etc/logrotate.d/#{application}.conf" | ||
end | ||
namespace :logrotate do | ||
desc "Copies the application logrotate file into /etc/logrotate.d" | ||
task :setup, :except => { :no_release => true } do | ||
run "cp #{current_path}/config/deploy/#{stage}/logrotate.conf /etc/logrotate.d/#{application}.conf" | ||
end | ||
end | ||
end |
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,32 @@ | ||
# Define some defaults for capistrano deploys. | ||
# To load this capistrano configuraiton, require 'easy/deployment/niet' from deploy.rb | ||
|
||
Capistrano::Configuration.instance(:must_exist).load do | ||
namespace :niet do | ||
desc "Starts the niet process monitor" | ||
task :start, roles: :job do | ||
2.times do | ||
run "niet -c #{current_path} bundle exec rake jobs:work RAILS_ENV=#{stage}" | ||
end | ||
end | ||
|
||
desc "Restarts the niet process monitor" | ||
task :restart, roles: :job do | ||
run "killall -u deploy niet" | ||
end | ||
|
||
desc "Stops the niet process monitor" | ||
task :stop, roles: :job do | ||
run "killall -u deploy -QUIT niet" | ||
end | ||
|
||
desc "Diplays the status of the niet process monitor" | ||
task :status, roles: :job do | ||
run "ps -fu deploy" | ||
end | ||
end | ||
|
||
# niet hooks | ||
after 'deploy:start', 'niet:start' | ||
after 'deploy:restart', 'niet:restart' | ||
end |