Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ccocchi/capistrano-unicorn-rails
Simple Unicorn! integration with Capistrano v3 for Rails projets
https://github.com/ccocchi/capistrano-unicorn-rails
Last synced: 8 days ago
JSON representation
Simple Unicorn! integration with Capistrano v3 for Rails projets
- Host: GitHub
- URL: https://github.com/ccocchi/capistrano-unicorn-rails
- Owner: ccocchi
- License: mit
- Created: 2014-01-06T17:23:06.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2014-01-10T14:39:36.000Z (almost 11 years ago)
- Last Synced: 2024-10-21T16:00:46.901Z (17 days ago)
- Language: Ruby
- Homepage:
- Size: 160 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Capistrano::Unicorn
Unicorn basic tasks for Capistrano v3:
- `cap unicorn:restart`
- `cap unicorn:stop`There is no `start` task since Capistrano v3 only use `restart`. The `unicorn:restart`
will handle both the start and the restart of the unicorn server.Some unicorn specific options
```ruby
set :unicorn_rails_env, ->{ fetch :rails_env, "production" }
set :unicorn_pid_path, ->{ File.join(current_path, 'tmp', 'pids', 'unicorn.pid') }
set :unicorn_config_path, ->{ File.join(current_path, 'config', 'unicorn.rb') }
```The task will use the `unicorn_rails` binary to avoid unnecessary middlewares added by
the `unicorn` binary (Rails already takes care of that)## Installation
Add this line to your application's Gemfile:
gem 'capistrano-unicorn-rails'
## Usage
Require `capistrano/unicorn` inside your `Capfile` to load all tasks.
By default, no task are automatically added since Capistrano will remove the default `deploy:restart` in its version 3.1.
You'll need to invoke directly the task inside your `config/deploy.rb````ruby
namespace :deploy do
desc 'Restart application'
task :restart do
invoke 'unicorn:restart'
end
end
```or
```ruby
after 'deploy:published', 'unicorn:restart'
```## 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 new Pull Request