Sha256: 9a4f4130530e70492a1731a52515222379ddf583e62578c997937a96d636fd35

Contents?: true

Size: 602 Bytes

Versions: 1

Compression:

Stored size: 602 Bytes

Contents

desc 'run post-deployment stuff'
task :post_deploy do

  # Precompile assets
  puts 'Precompiling assets'
  Rake::Task["assets:precompile"].invoke

  # Run migrations
  puts 'Running migrations if necessary'
  Rake::Task["db:migrate"].invoke

  # Trigger Unicorn reexec with 0 downtime
  puts 'restarting unicorns'
  system "<%= restart_unicorn_command %>"

  # Enable monit monitoring
  puts 'enable monit'
  system "<%= restart_monit_command %>"

  # Notify Airbrake of deployment
  puts 'notifying airbrake'
  system "rake airbrake:deploy TO=#{ENV['RAILS_ENV']} REVISION=$(git show-ref --hash)"
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
shoestrap-0.2.1 lib/generators/shoestrap/templates/deployment/deployment.rake.erb