Sha256: 63c34dc39aad5717af5880ba2dae98a38f6c784820917b176f599ae1d8a64449

Contents?: true

Size: 728 Bytes

Versions: 3

Compression:

Stored size: 728 Bytes

Contents

<%
  @path = "/etc/haproxy/haproxy.cfg"
  @additive = ["# start haproxy unicorn", "# end haproxy unicorn"]
%>

<%
  backend_hosts = rubber_instances.for_role('app').collect { |i| i.name }
%>

listen unicorn_proxy 0.0.0.0:<%= rubber_env.web_port %>
  option forwardfor
  <% backend_hosts.each do |server| %>
    server <%= server %> <%= server %>:<%= rubber_env.unicorn_listen_port %> maxconn <%= rubber_env.max_app_connections %> check
  <% end %>

listen unicorn_proxy_ssl 0.0.0.0:<%= rubber_env.web_ssl_port %>
  mode tcp
  option forwardfor
  <% backend_hosts.each do |server| %>
    server <%= server %> <%= server %>:<%= rubber_env.unicorn_listen_ssl_port %> maxconn <%= rubber_env.max_app_connections %> check
  <% end %>

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rubber-2.1.2 templates/complete_unicorn_nginx/config/rubber/role/haproxy/haproxy-unicorn.conf
rubber-2.1.1 templates/complete_unicorn_nginx/config/rubber/role/haproxy/haproxy-unicorn.conf
rubber-2.1.0 templates/complete_unicorn_nginx/config/rubber/role/haproxy/haproxy-unicorn.conf