Thanks to visit codestin.com
Credit goes to Github.com

Skip to content

Discover services and create dynamically the haproxy.cfg based on the labels defined in docker containers or from a simple static Yaml

License

Notifications You must be signed in to change notification settings

byjg/docker-easy-haproxy

Repository files navigation

EasyHAProxy

Sponsor Opensource ByJG Build Status GitHub source GitHub license GitHub release Helm Version Artifact Hub

EasyHAProxy

Service discovery for HAProxy

EasyHAProxy dynamically creates haproxy.cfg based on metadata from your workloads — Docker labels, Swarm service labels, or Kubernetes Ingress annotations. No HAProxy knowledge required.

Features

  • Automatic service discovery — Docker, Docker Swarm, Kubernetes, or static YAML
  • Zero-downtime HAProxy reload — configuration updates happen without dropping connections
  • Automatic TLS with ACME — Let's Encrypt, ZeroSSL, BuyPass, and more
  • Custom SSL certificates — volume-mount or label-embed your own PEM files
  • TCP mode — proxy any TCP service, not just HTTP
  • Plugin system — JWT validation, IP whitelisting, Cloudflare IP restoration, FastCGI, path blocking, and custom plugins
  • Real-time monitoring dashboard — built-in, zero-dependency web UI with live traffic charts, frontend/backend health, and per-server stats (enabled with a single env var)
  • Balance algorithms — roundrobin, leastconn, source, uri, and more

Supported platforms

Kubernetes Docker Swarm Docker Static

Install using tools:

Helm MicroK8s Dokku DigitalOcean

Documentation

Section Description
Getting Started Choose your runtime and discovery mode, minimal working setup
Guides SSL, ACME, plugins, Helm, MicroK8s, Dokku, DigitalOcean
Concepts Service discovery, config pipeline, plugin model, TLS termination
Reference Environment variables, container labels, CLI flags, volumes

Who is using?

EasyHAProxy is part of some projects:

Monitoring Dashboard

HAProxy Monitor

A real-time dashboard is available at http://<host>:11936/ whenever HAPROXY_PASSWORD is set — no extra containers, no Prometheus, no Grafana. See the dashboard guide.

See EasyHAProxy in action

Click on the image to see the videos (use HD for better visualization)

Docker In Action Docker and Letsencrypt K8s In Action K8s and Letsencrypt Static Configuration TCP Mode

Here is the code applied in the test examples above.


Open source ByJG

About

Discover services and create dynamically the haproxy.cfg based on the labels defined in docker containers or from a simple static Yaml

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published

Contributors 10