File tree Expand file tree Collapse file tree 3 files changed +12
-2
lines changed Expand file tree Collapse file tree 3 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,13 @@ services:
2020 reservations:
2121 cpus: "0.1"
2222 memory: "128M"
23- # healthcheck: https://github.com/haproxy/haproxy/issues/3091
23+ healthcheck: # https://stackoverflow.com/a/76513320/12124525
24+ test: bash -c 'echo "" > /dev/tcp/127.0.0.1/32087 || exit 1'
25+ start_period: 5s
26+ timeout: 2s
27+ retries: 2
28+ interval: 10s
29+
2430 networks:
2531 - rabbit
2632 configs:
Original file line number Diff line number Diff line change @@ -38,6 +38,11 @@ frontend rabbit_dashboard
3838 bind *:{{ RABBIT_MANAGEMENT_PORT }}
3939 default_backend rabbit_dashboard_backends
4040
41+ frontend health
42+ mode http
43+ bind 127.0.0.1:32087
44+ http-request return status 200 if { src 127.0.0.0/8 }
45+
4146backend rabbit_backends
4247 # side effect of roundrobin is connection should be evenly distributed
4348 # thus rabbit queue leader replica shall be also evenly distributed
Original file line number Diff line number Diff line change @@ -13,4 +13,3 @@ RABBIT_LB_REPLICAS=${RABBIT_LB_REPLICAS}
1313RABBIT_NETWORK = ${ RABBIT_NETWORK }
1414
1515PUBLIC_NETWORK = ${ PUBLIC_NETWORK }
16- MONITORING_DOMAIN = ${ MONITORING_DOMAIN }
You can’t perform that action at this time.
0 commit comments