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: docs/config.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,9 +31,10 @@ The following environment variables can be used to configure the *Docker Flow Pr
31
31
|EXTRA_FRONTEND |Value will be added to the default `frontend` configuration. Multiple lines should be separated with comma (*,*).|
32
32
|EXTRA_GLOBAL |Value will be added to the default `global` configuration. Multiple lines should be separated with comma (*,*).|
33
33
|HTTPS_ONLY |If set to true, all requests to all services will be redirected to HTTPS.<br>**Example:**`true`<br>**Default Value:**`false`|
34
-
|LISTENER_ADDRESS |The address of the [Docker Flow: Swarm Listener](https://github.com/docker-flow/docker-flow-swarm-listener) used for automatic proxy configuration.<br>**Example:**`swarm-listener:8080`|
34
+
|LISTENER_ADDRESS |The address of the [Docker Flow: Swarm Listener](https://github.com/docker-flow/docker-flow-swarm-listener) used for automatic proxy configuration. Multiple values can be separated with comma (`,`). When set to multiple values, the proxy will query each address in order.<br>**Example:**`swarm-listener`|
35
35
PROXY_INSTANCE_NAME|The name of the proxy instance. Useful if multiple proxies are running inside a cluster.<br>**Default value:**`docker-flow`|
36
36
|RECONFIGURE_ATTEMPTS|The number of attempts the proxy will try to reconfigure itself before giving up and removing the offending service. The period between reconfigure attempts is 1 second.<br>**Example:**`15`<br>**Default value:**`20`|
37
+
|RELOAD_ATTEMPTS |The number of attempts the proxy will query a listener addresss during startup. Only used when LISTENER_ADDRESS is a comma seperated list of addresses.<br>**Default value:**`5`|
37
38
|RELOAD_INTERVAL |Defines the frequency (in milliseconds) between automatic config reloads from Swarm Listener.<br>**Default value:**`5000`|
38
39
|REPEAT_RELOAD |If set to `true`, the proxy will periodically reload the config, using `RELOAD_INTERVAL` as pause between iterations.<br>**Example:**`true`<br>**Default value:**`false`|
39
40
|RESOLVERS |The list of resolvers separated with comma (`,`). The `CHECK_RESOLVERS` environment variable must be set to `true`.<br>**Example:**`nameserver dns-0 4.4.2.1:53,nameserver dns-1 8.8.8.8:53`|
Copy file name to clipboardExpand all lines: server.go
+46-11Lines changed: 46 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -23,16 +23,18 @@ type Server interface {
23
23
}
24
24
25
25
typeservestruct {
26
-
IPstring`short:"i" long:"ip" default:"0.0.0.0" env:"IP" description:"IP the server listens to."`
27
-
ListenerAddressstring`short:"l" long:"listener-address" env:"LISTENER_ADDRESS" description:"The address of the Docker Flow: Swarm Listener. The address matches the name of the Swarm service (e.g. swarm-listener)"`
28
-
Portstring`short:"p" long:"port" default:"8080" env:"PORT" description:"Port the server listens to."`
29
-
ServiceNamestring`short:"n" long:"service-name" default:"proxy" env:"SERVICE_NAME" description:"The name of the proxy service. It is used only when running in 'swarm' mode and must match the '--name' parameter used to launch the service."`
26
+
IPstring`short:"i" long:"ip" default:"0.0.0.0" env:"IP" description:"IP the server listens to."`
27
+
ListenerAddresses[]string`short:"l" long:"listener-address" env:"LISTENER_ADDRESS" env-delim:"," description:"The address of the Docker Flow: Swarm Listener. The address matches the name of the Swarm service (e.g. swarm-listener)" default:""`
28
+
Portstring`short:"p" long:"port" default:"8080" env:"PORT" description:"Port the server listens to."`
29
+
ServiceNamestring`short:"n" long:"service-name" default:"proxy" env:"SERVICE_NAME" description:"The name of the proxy service. It is used only when running in 'swarm' mode and must match the '--name' parameter used to launch the service."`
0 commit comments