docs(readme): document gordon.proxy.port label for multi-port images
Add documentation explaining how to use the gordon.proxy.port Dockerfile label when an image exposes multiple ports. This ensures Gordon proxies to the correct HTTP port instead of defaulting to the first exposed port.
- commit
- f01d1c9cd53e11f2d452a9fef9659c302dd05f09
- author
- brice · · 2026-01-14 06:47 UTC
- parent
- 408a38d
- signature
- GPG Verified
CD88F9E564E0102646FB6077A1A07C7C7C3E349D· arch-gpg Verified for the committer email
1 file · +18 -0
M README.md +18 -0
| @@ -82,6 +82,24 @@ FROM node:18 | |||
| 82 | 82 | VOLUME ["/app/uploads", "/app/data"] # Multiple volumes supported | |
| 83 | 83 | ``` | |
| 84 | 84 | ||
| 85 | + | ### Proxy Port Selection | |
| 86 | + | When an image exposes multiple ports, Gordon needs to know which one to proxy HTTP traffic to. By default, Gordon uses the first exposed port, but you can specify the exact port with a label: | |
| 87 | + | ||
| 88 | + | ```dockerfile | |
| 89 | + | # Gitea exposes both SSH (22) and HTTP (3000) | |
| 90 | + | FROM gitea/gitea:latest | |
| 91 | + | LABEL gordon.proxy.port=3000 | |
| 92 | + | EXPOSE 22 | |
| 93 | + | EXPOSE 3000 | |
| 94 | + | ``` | |
| 95 | + | ||
| 96 | + | Without the label, Gordon would proxy to port 22 (SSH), which would fail. The `gordon.proxy.port` label tells Gordon to route HTTP traffic to port 3000. | |
| 97 | + | ||
| 98 | + | **When to use this label:** | |
| 99 | + | - Images that expose multiple ports (web + SSH, web + metrics, etc.) | |
| 100 | + | - When the first exposed port isn't the HTTP service | |
| 101 | + | - To be explicit about which port serves your web application | |
| 102 | + | ||
| 85 | 103 | ### Environment Configuration | |
| 86 | 104 | Gordon automatically creates and loads env files based on domain names: | |
| 87 | 105 | ```bash | |
| @@ -82,6 +82,24 @@ FROM node:18 | |||||
| 82 | VOLUME ["/app/uploads", "/app/data"] # Multiple volumes supported | 82 | VOLUME ["/app/uploads", "/app/data"] # Multiple volumes supported | ||
| 83 | ``` | 83 | ``` | ||
| 84 | 84 | ||||
| 85 | + | ### Proxy Port Selection | |||
| 86 | + | When an image exposes multiple ports, Gordon needs to know which one to proxy HTTP traffic to. By default, Gordon uses the first exposed port, but you can specify the exact port with a label: | |||
| 87 | + | ||||
| 88 | + | ```dockerfile | |||
| 89 | + | # Gitea exposes both SSH (22) and HTTP (3000) | |||
| 90 | + | FROM gitea/gitea:latest | |||
| 91 | + | LABEL gordon.proxy.port=3000 | |||
| 92 | + | EXPOSE 22 | |||
| 93 | + | EXPOSE 3000 | |||
| 94 | + | ``` | |||
| 95 | + | ||||
| 96 | + | Without the label, Gordon would proxy to port 22 (SSH), which would fail. The `gordon.proxy.port` label tells Gordon to route HTTP traffic to port 3000. | |||
| 97 | + | ||||
| 98 | + | **When to use this label:** | |||
| 99 | + | - Images that expose multiple ports (web + SSH, web + metrics, etc.) | |||
| 100 | + | - When the first exposed port isn't the HTTP service | |||
| 101 | + | - To be explicit about which port serves your web application | |||
| 102 | + | ||||
| 85 | ### Environment Configuration | 103 | ### Environment Configuration | ||
| 86 | Gordon automatically creates and loads env files based on domain names: | 104 | Gordon automatically creates and loads env files based on domain names: | ||
| 87 | ```bash | 105 | ```bash | ||