...
Code Block | ||||
---|---|---|---|---|
| ||||
CONTAINER=haproxy IMAGE=haproxy:1.9.4 DIR=`pwd -P` docker stop $CONTAINER docker rm $CONTAINER docker run -d \ --net host \ --restart=always \ -v $DIR/conf:/usr/local/etc/haproxy:ro \ --name $CONTAINER \ $IMAGE docker logs -f $CONTAINER |
Proxying a port using HAProxy
Code Block |
---|
global
maxconn 100
defaults
log global
mode tcp
retries 2
timeout client 30m
timeout connect 4s
timeout server 30m
timeout check 5s
listen stats
mode http
bind *:7000
stats enable
stats uri /
listen postgres
bind *:5001
server postgres dbhost:5432 maxconn 100 check port 5432
|
Reference
Reference | URL |
---|---|
HAProxy Configuration | https://cbonte.github.io/haproxy-dconv/1.9/configuration.html |
Intro to HAProxy | https://www.digitalocean.com/community/tutorials/an-introduction-to-haproxy-and-load-balancing-concepts |
...