-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
capistrano tasks #2
Labels
Comments
We don't use Capistrano at all. So I doubt we'll find the time to add the functionality. But we'd be happy to accept any pull requests. |
Example capistrano tasks: namespace :maintenance do
desc "Maintenance start"
task :on, :roles => :web do
on_rollback { run "rm #{current_path}/tmp/maintenance.yml" }
page = File.read("config/maintenance.yml")
put page, "#{current_path}/tmp/maintenance.yml", :mode => 0644
end
desc "Maintenance stop"
task :off, :roles => :web do
run "rm #{release_path}/tmp/maintenance.yml"
end
end |
huh, it'll great to meet this hack on project wiki :) |
@scottkf Thanks! |
my tasks for capistrano3 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
Could you add please capistrano tasks to enable maintance mode remotely?
The text was updated successfully, but these errors were encountered: