Browse Source

Use APP_DOMAIN instead of hostname -f

Girish Ramakrishnan 9 years ago
parent
commit
ef9109b6e6
2 changed files with 2 additions and 4 deletions
  1. 1 1
      app.ini.template
  2. 1 3
      start.sh

+ 1 - 1
app.ini.template

@@ -17,7 +17,7 @@ SCRIPT_TYPE = bash
 
 [server]
 PROTOCOL = http
-DOMAIN = ##HOSTNAME
+DOMAIN = ##DOMAIN
 ROOT_URL = https://%(DOMAIN)s/
 HTTP_ADDR =
 HTTP_PORT = 3000

+ 1 - 3
start.sh

@@ -2,8 +2,6 @@
 
 set -eu -o pipefail
 
-readonly fqdn=$(hostname -f)
-
 setup_ldap_source() {
     set -eu
 
@@ -27,7 +25,7 @@ sed -e "s/^Port .*/Port ${SSH_PORT}/" \
     -e "s/^#ListenAddress .*/ListenAddress 0.0.0.0/" \
     /etc/ssh/sshd_config > /run/gogs/sshd_config
 
-sed -e "s/##HOSTNAME/${fqdn}/g" \
+sed -e "s/##DOMAIN/${APP_DOMAIN}/g" \
     -e "s/##SSH_PORT/${SSH_PORT}/g" \
     -e "s/##MYSQL_HOST/${MYSQL_HOST}/g" \
     -e "s/##MYSQL_PORT/${MYSQL_PORT}/g" \