Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
capistrano prettify
# 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