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
+48-13Lines changed: 48 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,23 +41,58 @@ Then the env var in SWAG can be set as `DOCKER_HOST=dockerproxy`. This will allo
41
41
42
42
If both `DOCKER_HOST` and `docker.sock` volumes are provided this mod will detect containers using both connections. As noted in the [requirements](#requirements), containers detected via `docker.sock` must be in the same user defined network or have `swag_address` label set.
43
43
44
-
Multiple remote hosts can be used via `DOCKER_HOST` by separating hosts with a comma. Additionally, a friendly host name can be assigned by suffixing the host with `|friendlyName`. If the host is not assigned a friendly name it will have a default generated like `hostN` where N is the position of the host in `DOCKER_HOST`. Example:
44
+
Multiple remote hosts can be used via `DOCKER_HOST` by separating hosts with a comma. Additional per-host settings can be assigned by separating with a pipe `|`. The syntax for per-host configuration:
When using a remote docker host from `DOCKER_HOST` auto-proxy assumes the detected containers on not on the same network as SWAG:
62
+
63
+
* If the detected containers do not have the `swag_address` label set then the Host IP will be used.
64
+
* If the detected containers do not have the `swag_port` label set then auto-proxy attempts to find a mapped **host port** on the container and will use it based on **container port** in this order:
65
+
* 80
66
+
* 8080
67
+
* The first mapped port, if any
68
+
69
+
### Subdomains and TLD
70
+
71
+
If a detected container does not have `swag_url` label set then the subdomain and TLD can be programmatically generated.
72
+
73
+
The default TLD used in nginx [`server_name` directive](https://nginx.org/en/docs/http/server_names.html) can be set using `HOST_TLD`. This can also be set per-host using the syntax described in [`DOCKER_HOST` for `default_tld`.](#multiple-hosts)
74
+
75
+
The subdomain used for a container can optionally be modified to include the Host's `friendly_name` described in the `DOCKER_HOST` syntax by setting the `HOST_INSERT` to either `prefix` or `suffix`
55
76
56
-
If the detected containers for each host do not have the `swag_url` label set then the default can be configured with friendly host name inserted into the url as either a suffix or prefix using the env `HOST_INSERT`. Example:
0 commit comments