Gregory Eremin 0e17b71ee9 | ||
---|---|---|
lib/mina | ||
.gitignore | ||
Gemfile | ||
LICENSE.txt | ||
README.md | ||
Rakefile | ||
mina_reboot.gemspec |
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
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request