Created
September 17, 2015 20:01
-
-
Save michaeljs1990/d9e066b9d019bd25dc4f 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
FROM haproxy:1.5 | |
ENV PAYMENTS_URL test.com | |
COPY src/haproxy.cfg /usr/local/etc/haproxy/haproxy.cfg | |
CMD sh -c "haproxy -f /usr/local/etc/haproxy/haproxy.cfg" |
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 | |
stats socket /tmp/haproxy.sock mode 600 level admin | |
defaults | |
mode http | |
stats enable | |
stats uri /haproxy_stats | |
stats realm HAProxy\ Statistics | |
stats auth username:password | |
stats refresh 5s | |
frontend http-proxy | |
bind *:80 | |
acl pay hdr(host) -i ${PAYMENTS_URL} | |
use_backend payments if pay | |
backend payments | |
balance roundrobin |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment