lib |
script |
8y CODE_OF_CONDUCT.md |
8y Gemfile |
8y Gemfile.lock |
8y LICENSE |
8y README.md |
8y Rakefile |
8y capistrano-nginx.gemspec |
nginx support for Capistrano 3.x
Makes it possible to reload/restart nginx during deploy
Add this line to your application's Gemfile:
gem 'capistrano', '~> 3.0.0' gem 'capistrano-nginx'
And then execute:
$ bundle
Or install it yourself as:
$ gem install capistrano-nginx
Require in Capfile to use the default task:
require 'capistrano/nginx'
Configure in deploy.rb to execute one of the tasks:
after 'deploy:published', 'nginx:reload' after 'deploy:published', 'nginx:restart'
You can also run it in isolation: cap production nginx:reload
or cap production nginx:restart
Configurable options:
set :nginx_reload_roles, :all set :nginx_reload_command, '/etc/init.d/nginx reload' set :nginx_restart_roles, :all set :nginx_restart_command, '/etc/init.d/nginx restart'
To install this gem onto your local machine, run bundle exec rake install
. To release a new version, update the version number in version.rb
, and then run bundle exec rake release
, which will create a git tag for the version, push git commits and tags, and push the .gem
file to rubygems.org.
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)The gem is available as open source under the terms of the MIT License.