detached f01d1c9

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 VerifiedCD88F9E564E0102646FB6077A1A07C7C7C3E349D · arch-gpg Verified for the committer email
1 file · +18 -0
M README.md +18 -0
@@ -82,6 +82,24 @@ FROM node:18
8282 VOLUME ["/app/uploads", "/app/data"] # Multiple volumes supported
8383 ```
8484
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+
85103 ### Environment Configuration
86104 Gordon automatically creates and loads env files based on domain names:
87105 ```bash
@@ -82,6 +82,24 @@ FROM node:18
82 VOLUME ["/app/uploads", "/app/data"] # Multiple volumes supported82 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 Configuration103 ### 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 ```bash105 ```bash

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 7

Tags 106

↑↓ moveenter openesc close