1
0
Fork 0
Mina hook to start the app after system reboot
Go to file
Gregory Eremin 0e17b71ee9
It works
2014-09-16 17:03:27 +04:00
lib/mina It works 2014-09-16 17:03:27 +04:00
.gitignore It works 2014-09-16 17:03:27 +04:00
Gemfile It works 2014-09-16 17:03:27 +04:00
LICENSE.txt It works 2014-09-16 17:03:27 +04:00
README.md It works 2014-09-16 17:03:27 +04:00
Rakefile It works 2014-09-16 17:03:27 +04:00
mina_reboot.gemspec It works 2014-09-16 17:03:27 +04:00

README.md

Mina Reboot

Generates cron @reboot task every time you deploy with Mina, so your app will start automatically in case of server reboot.

Installation

Add this line to your application's Gemfile:

gem 'mina_reboot'

Usage

Add these lines to your application's deploy config:

require 'mina/reboot'

set :on_reboot, -> {
  # Tasks needed to start application
  invoke 'unicorn:start'
  invoke 'sidekiq:start'
}

task :deploy => :environment do
  # ...
  # Deploy commands
  # ...
  invoke 'reboot:save_startup_script'
end

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request