Last active
September 20, 2018 09:30
-
-
Save omarqureshi/700b76a5ac4ba158dc72b42a11147f7c to your computer and use it in GitHub Desktop.
This file contains hidden or 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
version: '3' | |
services: | |
haproxy: | |
image: haproxy:1.5 | |
volumes: | |
- /path/to/haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg | |
ports: | |
- "80:80" |
This file contains hidden or 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
global | |
log 127.0.0.1 local0 | |
log 127.0.0.1 local1 notice | |
defaults | |
log global | |
mode http | |
option httplog | |
option dontlognull | |
timeout connect 50000 | |
timeout client 100000 | |
timeout server 100000 | |
frontend http-in | |
bind 0.0.0.0:80 | |
mode http | |
default_backend pheme_backends | |
acl host_pheme hdr(host) -i pheme | |
acl host_gatekeeper hdr(host) -i gatekeeper | |
use_backend pheme_backends if host_pheme | |
use_backend gatekeeper_backends if host_gatekeeper | |
backend pheme_backends | |
mode http | |
option forwardfor | |
balance roundrobin | |
server pheme pheme:80 | |
backend gatekeeper_backends | |
mode http | |
option forwardfor | |
balance roundrobin | |
server gatekeeper gatekeeper:80 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment