Git Product home page Git Product logo

capistrano-unicorn-nginx's Introduction

Capistrano::UnicornNginx

Capistrano tasks for automatic and sensible unicorn + nginx configuraion.

Goals of this plugin:

  • automatic unicorn and nginx configuration for Rails apps
  • no manual ssh to the server required
  • zero downtime deployments enabled
  • support for single node as well as cluster deployments

Specifics:

  • generates nginx config file on the server (web role)
  • generates unicorn initializer and config files (app role)
    application is started automatically after server restart
  • capistrano tasks for server management, example: unicorn:restart
    see below for all available tasks
  • automatic load balancing setup when there are multiple app nodes

capistrano-unicorn-nginx works only with Capistrano 3!

Installation

Add this to Gemfile:

group :development do
  gem 'capistrano', '~> 3.2.1'
  gem 'capistrano-unicorn-nginx', '~> 3.2.0'
end

And then:

$ bundle install

Setup and usage

Depending on your needs 2 general scenarios are covered:

  • single server setup
    A scenario where you run the webserver (nginx) and application server (unicorn) on the same node.
  • multiple server setup
    Webserver (nginx) and application server (unicorn) run on different nodes.

Default log file directories

  • nginx: /var/log/nginx/
  • unicorn: #{shared_path}/log/

Configuration

See the full options list on the wiki page. Feel free to skip this unless you're looking for something specific.

How it works

How it works wiki page contains the list of tasks that the plugin executes.

You do not have to know this unless you want to learn more about the plugin internals.

Template customization

On template customization wiki page see how to inspect, tweak and override templates for nginx and unicorn config files.

Do not do this unless you have a specific need.

More Capistrano automation?

Check out capistrano-plugins github org.

Bug reports and pull requests

...are very welcome!

Thanks

@kalys - for his capistrano-nginx-unicorn plugin.

capistrano-unicorn-nginx's People

Contributors

hschoidr avatar jordanyaker avatar lonre avatar luciuschoi avatar mpapis avatar rhomeister avatar villosil avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.