1
0
Fork 0

Merge branch 'dokku' into refactory-labels

This commit is contained in:
Joao M 2022-08-14 10:24:27 -05:00 committed by GitHub
commit ccd0534781
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2,6 +2,11 @@
[![Opensource ByJG](https://img.shields.io/badge/opensource-byjg-success.svg)](http://opensource.byjg.com) [![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) [![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/uri.svg)](https://opensource.byjg.com/opensource/licensing.html)
[![GitHub release](https://img.shields.io/github/release/byjg/uri.svg)](https://github.com/byjg/docker-easy-haproxy/releases/)
Service discovery for HAProxy.
This Docker image will create dynamically the `haproxy.cfg` based on the labels defined in docker containers or from This Docker image will create dynamically the `haproxy.cfg` based on the labels defined in docker containers or from
a simple Yaml instead docker a simple Yaml instead docker
@ -13,7 +18,6 @@ a simple Yaml instead docker
- Discover and setup haproxy redirect from Docker Tag - Discover and setup haproxy redirect from Docker Tag
- Setup HAProxy CFG from a Yaml file. - Setup HAProxy CFG from a Yaml file.
## Basic Usage ## Basic Usage
The Easy HAProxy will create the `haproxy.cfg` automatically based on the containers or from a YAML provided. The Easy HAProxy will create the `haproxy.cfg` automatically based on the containers or from a YAML provided.
@ -43,9 +47,8 @@ The environment variables will setup the HAProxy.
| HAPROXY_STATS_PORT | (Optional) The HAProxy port to the statistics. Default: `1936` | | HAPROXY_STATS_PORT | (Optional) The HAProxy port to the statistics. Default: `1936` |
| HAPROXY_CUSTOMERRORS. | (Optional) If HAProxy will use custom HTML errors. true/false. Default: false | | HAPROXY_CUSTOMERRORS. | (Optional) If HAProxy will use custom HTML errors. true/false. Default: false |
The environment variable `EASYHAPROXY_DISCOVER` will define where is located your containers (see below more details): The environment variable `EASYHAPROXY_DISCOVER` will define where is located your containers (see below more details):
- docker - docker
- swarm - swarm
- static - static
@ -107,8 +110,7 @@ services:
... ...
``` ```
### Single Definition
### Single Definition:
```bash ```bash
docker run \ docker run \
@ -117,7 +119,7 @@ docker run \
.... ....
``` ```
### Multiples Definitions on the same container: ### Multiples Definitions on the same container
```bash ```bash
docker run \ docker run \
@ -134,7 +136,7 @@ docker run \
### TLS passthrough ### TLS passthrough
Used to pass on SSL-termination to a backend: Used to pass on SSL-termination to a backend. Alternatively, you can enable health-check via SSL on the backend with the optional `health-check` label:
```bash ```bash
docker run \ docker run \
@ -145,9 +147,7 @@ docker run \
some/tcp-service some/tcp-service
``` ```
- enable health-check via SSL on the backend with the optional `health-check` label ### Redirect Example
### Redirect Example:
```bash ```bash
docker run \ docker run \
@ -203,7 +203,6 @@ docker run \
-d byjg/easy-haproxy -d byjg/easy-haproxy
``` ```
## Handling SSL ## Handling SSL
You can attach a valid SSL certificate to the request. You can attach a valid SSL certificate to the request.
@ -241,10 +240,10 @@ where ERROR_NUMBER is the http error code (e.g. 503.http)
## Build ## Build
```
```bash
docker build -t byjg/easy-haproxy . docker build -t byjg/easy-haproxy .
``` ```
---- ----
[Open source ByJG](http://opensource.byjg.com) [Open source ByJG](http://opensource.byjg.com)