Skip to content

Instantly share code, notes, and snippets.

@vyorkin
Created December 29, 2014 23:12
Show Gist options
  • Select an option

  • Save vyorkin/3e8a29f702a4ec7b8988 to your computer and use it in GitHub Desktop.

Select an option

Save vyorkin/3e8a29f702a4ec7b8988 to your computer and use it in GitHub Desktop.
cap3 maintenance mode
namespace :maintenance do
desc "Maintenance start (edit config/maintenance.yml to provide parameters)"
task :start do
on roles(:web) do
upload! "config/maintenance.yml", "#{current_path}/tmp/maintenance.yml"
end
end
desc "Maintenance stop"
task :stop do
on roles(:web) do
execute "rm #{current_path}/tmp/maintenance.yml"
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment