Skip to content

Instantly share code, notes, and snippets.

@rasputnik
Created November 4, 2015 14:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rasputnik/3c4a846b5aedcef6ea02 to your computer and use it in GitHub Desktop.
Save rasputnik/3c4a846b5aedcef6ea02 to your computer and use it in GitHub Desktop.
bamboo haproxy template
{{ range $index, $app := .Apps }}
listen {{ $app.EscapedId }}_{{ $app.ServicePort }}
bind *:{{ $app.ServicePort }}
mode http
{{ if $app.HealthCheckPath }}
option httpchk GET {{ $app.HealthCheckPath }}
{{ end }}
balance leastconn
capture request header X-Forwarded-For len 15
{{ range $page, $task := .Tasks }}
server {{ $app.EscapedId}}-{{ $task.Host }}-{{ $task.Port }} {{ $task.Host }}:{{ $task.Port }} {{ if $app.HealthCheckPath }} check inter 30000 {{ end }} {{ end }}
{{ end }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment