mirror of
https://github.com/kemko/reproxy.git
synced 2026-01-01 15:55:49 +03:00
clarify default routing for docker provider
This commit is contained in:
@@ -92,7 +92,7 @@ This is a dynamic provider and file change will be applied automatically.
|
||||
|
||||
### Docker provider
|
||||
|
||||
Docker provider supports a fully automatic discovery (with `--docker.auto`) with no extra configuration needed. By default it redirects all requests like `http://<container_name>:<container_port>/(.*)` to the internal IP of the given container and the exposed port. Only active (running) containers will be detected.
|
||||
Docker provider supports a fully automatic discovery (with `--docker.auto`) with no extra configuration needed. By default, it redirects all requests like `http://<url>/<container name>/(.*)` to the internal IP of the given container and the exposed port. Only active (running) containers will be detected.
|
||||
|
||||
This default can be changed with labels:
|
||||
|
||||
@@ -112,7 +112,7 @@ With `--docker.auto`, all containers with exposed port will be considered as rou
|
||||
- Allow only a particular docker network with `--docker.network`
|
||||
- Set the label `reproxy.enabled=false` or `reproxy.enabled=no` or `reproxy.enabled=0`
|
||||
|
||||
If no `reproxy.route` defined, the default is `http://<container_name>:<container_port>/(.*)`. In case if all proxied source have the same pattern, for example `/api/(.*)` user can define the common prefix (in this case `/api`) for all container-based routes. This can be done with `--docker.prefix` parameter.
|
||||
If no `reproxy.route` defined, the default route is `^/<container_name>/(.*)`. In case if all proxied source should have the same prefix pattern, for example `/api/(.*)` user can define the common prefix (in this case `/api`) for all container-based routes. This can be done with `--docker.prefix` parameter.
|
||||
|
||||
Docker provider also allows to define multiple set of `reproxy.N.something` labels to match multiple distinct routes on the same container. This is useful as in some cases a single container may expose multiple endpoints, for example, public API and some admin API. All the labels above can be used with "N-index", i.e. `reproxy.1.server`, `reproxy.1.port` and so on. N should be in 0 to 9 range.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user