You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+21-12Lines changed: 21 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,12 @@ Docker Flow: Proxy
8
8
*[The Swarm Mode (Docker 1.12+) with manual configuration](articles/swarm-mode.md)
9
9
*[The Default Mode](articles/standard-mode.md)
10
10
11
-
*[Containers Definition](#containers-definition)
11
+
*[Container Config](#container-config)
12
+
13
+
*[Environment Variables](#environment-variables)
14
+
*[Custom Config](#custom-config)
15
+
*[Custom Errors](#custom-errors)
16
+
12
17
*[Usage](#usage)
13
18
14
19
*[Reconfigure](#reconfigure)
@@ -18,24 +23,21 @@ Docker Flow: Proxy
18
23
19
24
*[Feedback and Contribution](#feedback-and-contribution)
20
25
21
-
Introduction
22
-
------------
26
+
## Introduction
23
27
24
28
The goal of the *Docker Flow: Proxy* project is to provide an easy way to reconfigure proxy every time a new service is deployed, or when a service is scaled. It does not try to "reinvent the wheel", but to leverage the existing leaders and combine them through an easy to use integration. It uses [HAProxy](http://www.haproxy.org/) as a proxy and adds custom logic that allows on-demand reconfiguration.
25
29
26
-
Modes
27
-
-----
30
+
## Modes
28
31
29
32
Since the Docker 1.12 release, *Docker Flow: Proxy* supports two modes. The default mode is designed to work with any setup and requires Consul and Registrator. The **swarm** mode aims to leverage the benefits that come with *Docker Swarm* and new networking introduced in the 1.12 release. The later mode (*swarm*) does not have any dependency but Docker Engine. The *swarm* mode is recommended for all who use *Docker Swarm* features introduced in v1.12.
30
33
31
-
###[The Swarm Mode (Docker 1.12+) with automatic configuration](articles/swarm-mode-listener.md)
32
-
###[The Swarm Mode (Docker 1.12+) with manual configuration](articles/swarm-mode.md)
33
-
###[The Default Mode](articles/standard-mode.md)
34
+
###[The Swarm Mode (Docker 1.12+) with automatic configuration](articles/swarm-mode-listener.md)
35
+
###[The Swarm Mode (Docker 1.12+) with manual configuration](articles/swarm-mode.md)
36
+
###[The Default Mode](articles/standard-mode.md)
34
37
35
-
Usage
36
-
-----
38
+
## Container Config
37
39
38
-
### Container Config
40
+
### Environment Variables
39
41
40
42
> The *Docker Flow: Proxy* container can be configured through environment variables
41
43
@@ -58,14 +60,21 @@ The following environment variables can be used to configure the *Docker Flow: P
58
60
|TIMEOUT_HTTP_KEEP_ALIVE|The HTTP keep alive timeout in seconds ||15 |10 |
59
61
|USERS |A comma-separated list of credentials(<user>:<pass>) for HTTP basic auth, which applies to all the backend routes.|||user1:pass1,user2:pass2|
60
62
63
+
### Custom Config
61
64
62
-
The base HAProxy configuration can be found in [haproxy.tmpl](haproxy.tmpl). It can be customized by creating a new container. An example *Dockerfile* is as follows.
65
+
The base HAProxy configuration can be found in [haproxy.tmpl](haproxy.tmpl). It can be customized by creating a new image. An example *Dockerfile* is as follows.
63
66
64
67
```
65
68
FROM vfarcic/docker-flow-proxy
66
69
COPY haproxy.tmpl /cfg/tmpl/haproxy.tmpl
67
70
```
68
71
72
+
### Custom Errors
73
+
74
+
Default error messages are stored in the `/errorfiles` directory inside the *Docker Flow: Proxy* image. They can be customized by creating a new image with custom error files or mounting a volume. Currently supported errors are `400`, `403`, `405`, `408`, `429`, `500`, `502`, `503`, and `504`.
75
+
76
+
## Usage
77
+
69
78
### Reconfigure
70
79
71
80
> Reconfigures the proxy using information stored in Consul
0 commit comments