Created
July 26, 2012 09:14
-
-
Save mikhailov/3181149 to your computer and use it in GitHub Desktop.
capistrano prettify
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
# standard capistrano config goes here.... | |
# Put the maintenance screen if DB migrations take in place only | |
before "deploy", "deploy:delayed_job:stop" | |
before "deploy:migrations", "deploy:delayed_job:stop" | |
after "deploy:update_code", "deploy:symlink_shared", "deploy:assets_compress" | |
before "deploy:migrate", "deploy:web:disable", "deploy:db:backup" | |
after "deploy", "newrelic:notice_deployment", "deploy:cleanup", "deploy:delayed_job:restart" | |
after "deploy:migrations", "deploy:web:enable", "newrelic:notice_deployment", "deploy:cleanup", "deploy:delayed_job:restart" | |
# Prettify output to console | |
logger.level = Capistrano::Logger::IMPORTANT | |
STDOUT.sync | |
before "deploy:web:disable" do print "\e[34m-->\e[0m Put maintenance screen......"; end | |
after "deploy:web:disable" do puts "[\e[32m✓\e[0m]"; end | |
before "deploy:delayed_job:stop" do print "\e[35m-->\e[0m Stop DelayedJob............."; end | |
after "deploy:delayed_job:stop" do puts "[\e[32m✓\e[0m]"; end | |
before "deploy:update_code" do print "\e[36m-->\e[0m Code Update................."; end | |
after "deploy:update_code" do puts "[\e[32m✓\e[0m]"; end | |
before "deploy:db:backup" do print "\e[41m-->\e[0m DB backup..................."; end | |
after "deploy:db:backup" do puts "[\e[32m✓\e[0m]"; end | |
before "deploy:assets_compress" do print "\e[33m-->\e[0m Assets Compress............."; end | |
after "deploy:assets_compress" do puts "[\e[32m✓\e[0m]"; end | |
before "deploy:delayed_job:restart" do print "\e[35m-->\e[0m Restart DelayedJob.........."; end | |
after "deploy:delayed_job:restart" do puts "[\e[32m✓\e[0m]"; end | |
before "deploy:web:enable" do print "\e[34m-->\e[0m Remove maintenance screen..."; end | |
after "deploy:web:enable" do puts "[\e[32m✓\e[0m]"; end | |
before "newrelic:notice_deployment" do print "\e[39m-->\e[0m Notice NewRelic............."; end | |
before "deploy:stop" do print "\e[37m-->\e[0m Unicorn stop................"; end | |
after "deploy:stop" do puts "[\e[32m✓\e[0m]"; end | |
before "deploy:start" do print "\e[37m-->\e[0m Unicorn start..............."; end | |
after "deploy:start" do puts "[\e[32m✓\e[0m]"; end | |
before "deploy:restart" do print "\e[37m-->\e[0m Unicorn restart............."; end | |
after "deploy:restart" do puts "[\e[32m✓\e[0m]"; end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment