Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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"
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
You can’t perform that action at this time.