Update README.md
This commit is contained in:
parent
e89a329781
commit
9dd021e662
1 changed files with 12 additions and 13 deletions
25
README.md
25
README.md
|
|
@ -2,6 +2,11 @@
|
||||||
|
|
||||||
[](http://opensource.byjg.com)
|
[](http://opensource.byjg.com)
|
||||||
[](https://github.com/byjg/docker-easy-haproxy/actions/workflows/build.yml)
|
[](https://github.com/byjg/docker-easy-haproxy/actions/workflows/build.yml)
|
||||||
|
[](https://github.com/byjg/docker-easy-haproxy/)
|
||||||
|
[](https://opensource.byjg.com/opensource/licensing.html)
|
||||||
|
[](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 `DISCOVER` will define where is located your containers (see below more details):
|
The environment variable `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 \
|
||||||
|
|
@ -118,7 +120,7 @@ docker run \
|
||||||
....
|
....
|
||||||
```
|
```
|
||||||
|
|
||||||
### Multiples Definitions on the same container:
|
### Multiples Definitions on the same container
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker run \
|
docker run \
|
||||||
|
|
@ -137,7 +139,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 \
|
||||||
|
|
@ -149,9 +151,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 \
|
||||||
|
|
@ -207,7 +207,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.
|
||||||
|
|
@ -245,10 +244,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)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue