Sign inSign up

anibali/haproxy-discover

By anibali

Updated almost 10 years ago

An Alpine-based HAProxy image with Registrator-flavoured service discovery

Image
0

1.3K

anibali/haproxy-discover repository overview

HAProxy Docker image

Alpine Linux + HAProxy

docker pull anibali/haproxy-discover

This is a light-weight image that provides a HAProxy install with service discovery using Registrator. The only registry backend supported currently is etcd.

Typical setup:

  • One or more nodes running an etcd cluster
  • For each type of service,
    • One or more nodes each running an instance of the service and Registrator (connected to etcd)
    • One node running anibali/haproxy-discover for the service (connected to etcd). In some cases you may want to run multiple of these for redundancy
Usage
$ docker run --rm -p 80:80 -p 1936:1936 anibali/haproxy-discover \
  --service=hello --port=80 --registry="etcd://1.2.3.4:2379/services"

Sets up HAProxy to round robin between all discovered "hello" services that have port 80 published. The proxy port is the same as the service port (80 in this case). In this example it is assumed that Registrator has been set up to register services with etcd, which is running at address 1.2.3.4.

HAProxy stats are available on port 1936.

Tag summary

Content type

Image

Digest

sha256:51ae00a33

Size

5.7 MB

Last updated

almost 10 years ago

docker pull anibali/haproxy-discover