Public | Automated Build

Last pushed: 3 years ago
Short Description
Short description is empty for this repo.
Full Description


Docker container running HAProxy autoconfigured by consul-template.

You can easily run your own HAProxy loadbalancer.


$ docker run --name=myapp-loadbalancer \
    -it --rm \
    -p 8000 \
    -p \
    -e APP_NAME=myapp \
    -e CONSUL= \
  • port 8000 is where your upstream services get balanced
  • port 8081 is where you can see your HAProxy status.

APP_NAME is needed only when you are using example template. It is used so consul-template knows which service you are trying to balance.

Using example template

If you want you can use example template for HTTP load balancer. Simply set APP_NAME environment variable to a consul service name.
I.e. if your application is registred as 'myapplication' in consul then use '-e APP_NAME=myapplication' switch when running your docker container.

Docker Pull Command
Source Repository