Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
a capistrano recipe to setup HAProxy.
Ruby
branch: develop

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
.gitignore
Gemfile
LICENSE.txt
README.md
Rakefile
capistrano-haproxy.gemspec

README.md

capistrano-haproxy

a capistrano recipe to setup HAProxy.

Installation

Add this line to your application's Gemfile:

gem 'capistrano-haproxy'

And then execute:

$ bundle

Or install it yourself as:

$ gem install capistrano-haproxy

Usage

This recipe will setup HAProxy during deploy:setup task.

To enable this recipe, add following in your config/deploy.rb.

# in "config/deploy.rb"
require "capistrano-haproxy"
set(:haproxy_listens) {{
  "stats 127.0.0.1:8888" => {
    :mode => "http",
    :stats => "uri /server-status",
  }
}}

Following options are available to configure your HAProxy.

  • :haproxy_path - The base path of HAProxy configurations. Use /etc/haproxy by default.
  • :haproxy_global - The key-value map of global options of HAProxy.
  • :haproxy_defaults - The key-value map of defaults options of HAProxy.
  • :haproxy_listens - The definitions of listeners of HAProxy.
  • :haproxy_dependencies - The packages of HAProxy.
  • :haproxy_template_path - The local path to the configuration templates.
  • :haproxy_configure_files - The configuration files of HAProxy.
  • :haproxy_service_name - The name of HAProxy service. Use haproxy by default.

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

Author

License

MIT

Something went wrong with that request. Please try again.