dyrnq / local-haproxy

local-haproxy
https://hub.docker.com/r/dyrnq/local-haproxy
0 stars 0 forks source link

local-haproxy usage #1

Open dyrnq opened 4 months ago

dyrnq commented 4 months ago

mino

docker run \
-d \
--name local-minio \
--restart always \
--privileged \
--network host \
--env "PORT=19000" \
--env "IP_AUTODETECTION_METHOD=interface=enp0s8" \
--env "BACKEND_SERVER=192.168.55.121:9000 check,192.168.55.122:9000 check,192.168.55.123:9000 check,192.168.55.124:9000 check" \
--env "FQDN=minio.local" \
--env "FQDN_IP_AUTODETECTION_METHOD=interface=enp0s8" \
--env "HTTPCHK_PARAMS=GET /minio/health/live" \
--volume /etc/hosts:/host/etc/hosts:rw \
dyrnq/local-haproxy:latest

curl http://minio.local:19000/minio/health/live -I
HTTP/1.1 200 OK
Accept-Ranges: bytes
Content-Length: 0
Server: MinIO
Strict-Transport-Security: max-age=31536000; includeSubDomains
Vary: Origin
X-Amz-Id-2: 7b5eeefafe593b88ca9d66ec09b341d51ead5a25f7501ce21cc459bb4cfd8e93
X-Amz-Request-Id: 17E0C9C7C4A8C639
X-Content-Type-Options: nosniff
X-Xss-Protection: 1; mode=block
Date: Wed, 10 Jul 2024 07:35:17 GMT
dyrnq commented 4 months ago

nacos

docker run \
-d \
--name local-nacos \
--restart always \
--privileged \
--network host \
--env "PORT=18848" \
--env "IP_AUTODETECTION_METHOD=interface=enp0s8" \
--env "BACKEND_SERVER=192.168.55.224:8848 check,192.168.55.225:8848 check,192.168.55.226:8848 check" \
--env "FQDN=nacos.local" \
--env "FQDN_IP_AUTODETECTION_METHOD=interface=enp0s8" \
--env "HTTPCHK_PARAMS=GET /nacos/v2/console/health/liveness" \
--volume /etc/hosts:/host/etc/hosts:rw \
dyrnq/local-haproxy:latest

docker run \
-d \
--name local-nacos-9848 \
--restart always \
--privileged \
--network host \
--env "PORT=19848" \
--env "IP_AUTODETECTION_METHOD=interface=enp0s8" \
--env "BACKEND_SERVER=192.168.55.224:9848 check,192.168.55.225:9848 check,192.168.55.226:9848 check" \
--env "ADV_CHECK=tcp-check" \
--volume /etc/hosts:/host/etc/hosts:rw \
dyrnq/local-haproxy:latest

curl -fSL http://nacos.local:18848/nacos/v2/console/health/liveness
{"code":0,"message":"success","data":"ok"}
dyrnq commented 3 months ago

https://www.haproxy.com/documentation/dataplaneapi/community/