Created
November 4, 2015 14:43
-
-
Save rasputnik/3c4a846b5aedcef6ea02 to your computer and use it in GitHub Desktop.
bamboo haproxy template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{{ 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