# EasyHAProxy [![Opensource ByJG](https://img.shields.io/badge/opensource-byjg-success.svg)](http://opensource.byjg.com) [![Build Status](https://github.com/byjg/docker-easy-haproxy/actions/workflows/build.yml/badge.svg?branch=master)](https://github.com/byjg/docker-easy-haproxy/actions/workflows/build.yml) [![GitHub source](https://img.shields.io/badge/Github-source-informational?logo=github)](https://github.com/byjg/docker-easy-haproxy/) [![GitHub license](https://img.shields.io/github/license/byjg/docker-easy-haproxy.svg)](https://opensource.byjg.com/opensource/licensing.html) [![GitHub release](https://img.shields.io/github/release/byjg/docker-easy-haproxy.svg)](https://github.com/byjg/docker-easy-haproxy/releases/) ![EasyHAProxy](docs/easyhaproxy_logo.png) ## Service discovery for HAProxy EasyHAProxy dynamically creates the `haproxy.cfg` based on the labels defined in docker containers. EasyHAProxy can detect and configure HAProxy automatically on the following platforms: - Docker - Docker Swarm - Kubernetes ## Features EasyHAProxy will discover the services based on the Docker Tags of the containers running on a Docker host or Docker Swarm cluster and dynamically set up the `haproxy.cfg`. Below, EasyHAProxy main features: - Use Letsencrypt with HAProxy. - Set your custom SSL certificates - Balance traffic between multiple replicas - Set SSL with three different levels of validations and according to the most recent definitions. - Set up HAProxy to listen to TCP. - Add redirects. - Enable/disable Stats on port 1936 with a custom password. - Enable/disable custom errors. Also, it is possible to set up HAProxy from a simple Yaml file instead of creating `haproxy.cfg` file. ## How Does It Works? You don't need to change your current infrastructure and don't need to learn the HAProxy configuration. The steps are: - Run the EasyHAProxy container; - Add some labels to the containers you want to be parsed by EasyHAProxy (see detailed instructions below); - EasyHAProxy will automatically detect the containers, set up, and reload the HAProxy configurations for you without downtime. ## Detailed Instructions For detailed instructions on how to use EasyHAProxy, follow the instructions for the platform you want to use: | [Kubernetes](docs/kubernetes.md) | [Docker Swarm](docs/swarm.md) | [Docker](docs/docker.md) | [Static](docs/static.md) |:----------:|:------------:|:------:|:-------: | ![Kubernetes](docs/easyhaproxy_kubernetes.png) | ![Docker Swarm](docs/easyhaproxy_swarm.png) | ![Docker](docs/easyhaproxy_docker.png) | ![Static](docs/easyhaproxy_static.png) ---- [Open source ByJG](http://opensource.byjg.com)