Skip to content

Commit 70d2244

Browse files
stealthyboxsapk
authored andcommitted
Support SSH_LISTEN_PORT env var in docker app.ini template (#7829)
Signed-off-by: leigh capili <[email protected]>
1 parent 7c8166d commit 70d2244

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

docker/root/etc/s6/gitea/setup

+1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ if [ ! -f ${GITEA_CUSTOM}/conf/app.ini ]; then
3131
ROOT_URL=${ROOT_URL:-""} \
3232
DISABLE_SSH=${DISABLE_SSH:-"false"} \
3333
SSH_PORT=${SSH_PORT:-"22"} \
34+
SSH_LISTEN_PORT=${SSH_LISTEN_PORT:-"${SSH_PORT}"} \
3435
LFS_START_SERVER=${LFS_START_SERVER:-"false"} \
3536
DB_TYPE=${DB_TYPE:-"sqlite3"} \
3637
DB_HOST=${DB_HOST:-"localhost:3306"} \

docker/root/etc/templates/app.ini

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ HTTP_PORT = $HTTP_PORT
1717
ROOT_URL = $ROOT_URL
1818
DISABLE_SSH = $DISABLE_SSH
1919
SSH_PORT = $SSH_PORT
20+
SSH_LISTEN_PORT = $SSH_LISTEN_PORT
2021
LFS_START_SERVER = $LFS_START_SERVER
2122
LFS_CONTENT_PATH = /data/git/lfs
2223

docs/content/doc/installation/with-docker.en-us.md

+1
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,7 @@ You can configure some of Gitea's settings via environment variables:
245245
* `RUN_MODE`: **dev**: For performance and other purposes, change this to `prod` when deployed to a production environment.
246246
* `SSH_DOMAIN`: **localhost**: Domain name of this server, used for the displayed clone URL in Gitea's UI.
247247
* `SSH_PORT`: **22**: SSH port displayed in clone URL.
248+
* `SSH_LISTEN_PORT`: **%(SSH\_PORT)s**: Port for the built-in SSH server.
248249
* `DISABLE_SSH`: **false**: Disable SSH feature when it's not available.
249250
* `HTTP_PORT`: **3000**: HTTP listen port.
250251
* `ROOT_URL`: **""**: Overwrite the automatically generated public URL. This is useful if the internal and the external URL don't match (e.g. in Docker).

0 commit comments

Comments
 (0)