Skip to content

Commit 99082ee

Browse files
authored
Fix; declare DOMAIN variable for docker setup (#10780)
In the /install form, the value for SSH Server Domain is taken form the DOMAIN variable and overwrites SSH_DOMAIN environment variable set the first time if nothing done Co-authored-by: Adrian POIGET <[email protected]>
1 parent 64029e1 commit 99082ee

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

docker/root/etc/s6/gitea/setup

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ if [ ! -f ${GITEA_CUSTOM}/conf/app.ini ]; then
2626
# Substitude the environment variables in the template
2727
APP_NAME=${APP_NAME:-"Gitea: Git with a cup of tea"} \
2828
RUN_MODE=${RUN_MODE:-"dev"} \
29+
DOMAIN=${DOMAIN:-"localhost"} \
2930
SSH_DOMAIN=${SSH_DOMAIN:-"localhost"} \
3031
HTTP_PORT=${HTTP_PORT:-"3000"} \
3132
ROOT_URL=${ROOT_URL:-""} \

docker/root/etc/templates/app.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ TEMP_PATH = /data/gitea/uploads
1212

1313
[server]
1414
APP_DATA_PATH = /data/gitea
15+
DOMAIN = $DOMAIN
1516
SSH_DOMAIN = $SSH_DOMAIN
1617
HTTP_PORT = $HTTP_PORT
1718
ROOT_URL = $ROOT_URL

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
date: "2016-12-01T16:00:00+02:00"
2+
date: "2020-03-19T19:27:00+02:00"
33
title: "Installation with Docker"
44
slug: "install-with-docker"
55
weight: 10
@@ -253,7 +253,8 @@ You can configure some of Gitea's settings via environment variables:
253253

254254
* `APP_NAME`: **"Gitea: Git with a cup of tea"**: Application name, used in the page title.
255255
* `RUN_MODE`: **dev**: For performance and other purposes, change this to `prod` when deployed to a production environment.
256-
* `SSH_DOMAIN`: **localhost**: Domain name of this server, used for the displayed clone URL in Gitea's UI.
256+
* `DOMAIN`: **localhost**: Domain name of this server, used for the displayed http clone URL in Gitea's UI.
257+
* `SSH_DOMAIN`: **localhost**: Domain name of this server, used for the displayed ssh clone URL in Gitea's UI. If the install page is enabled, SSH Domain Server takes DOMAIN value in the form (which overwrite this setting on save).
257258
* `SSH_PORT`: **22**: SSH port displayed in clone URL.
258259
* `SSH_LISTEN_PORT`: **%(SSH\_PORT)s**: Port for the built-in SSH server.
259260
* `DISABLE_SSH`: **false**: Disable SSH feature when it's not available.

0 commit comments

Comments
 (0)