From 2f26eee71434c6d896d8f51c45f8f1e321c9692c Mon Sep 17 00:00:00 2001 From: Sameer Naik Date: Tue, 25 Feb 2014 09:29:36 +0530 Subject: [PATCH] gitlab: added option to specify the public facing ssh port via GITLAB_SHELL_SSH_PORT variable. Closes #24 --- README.md | 1 + resources/gitlab | 4 ++++ resources/setup/config/gitlabhq/gitlab.yml | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 39615d10..49f98eb8 100644 --- a/README.md +++ b/README.md @@ -265,6 +265,7 @@ Below is the complete list of available options that can be used to customize yo - **GITLAB_EMAIL**: The email address for the GitLab server. Defaults to gitlab@localhost. - **GITLAB_SUPPORT**: The support email address for the GitLab server. Defaults to support@localhost. - **GITLAB_SIGNUP**: Enable or disable user signups. Default is false. +- **GITLAB_SHELL_SSH_PORT**: The ssh port number. Defaults to 22. - **REDIS_HOST**: The hostname of the redis server. Defaults to localhost - **REDIS_PORT**: The connection port of the redis server. Defaults to 6379. - **UNICORN_WORKERS**: The number of unicorn workers to start. Defaults to 2. diff --git a/resources/gitlab b/resources/gitlab index 04e7df70..39219f5b 100755 --- a/resources/gitlab +++ b/resources/gitlab @@ -9,6 +9,8 @@ GITLAB_EMAIL=${GITLAB_EMAIL:-gitlab@localhost} GITLAB_SUPPORT=${GITLAB_SUPPORT:-support@localhost} GITLAB_SIGNUP=${GITLAB_SIGNUP:-false} +GITLAB_SHELL_SSH_PORT=${GITLAB_SHELL_SSH_PORT:-22} + REDIS_HOST=${REDIS_HOST:-localhost} REDIS_PORT=${REDIS_PORT:-6379} @@ -152,6 +154,8 @@ sudo -u git -H sed 's/{{GITLAB_HTTPS}}/'${GITLAB_HTTPS}'/' -i /home/git/gitlab/c sudo -u git -H sed 's/{{GITLAB_EMAIL}}/'${GITLAB_EMAIL}'/' -i /home/git/gitlab/config/gitlab.yml sudo -u git -H sed 's/{{GITLAB_SUPPORT}}/'${GITLAB_SUPPORT}'/' -i /home/git/gitlab/config/gitlab.yml +sudo -u git -H sed 's/{{GITLAB_SHELL_SSH_PORT}}/'${GITLAB_SHELL_SSH_PORT}'/' -i /home/git/gitlab/config/gitlab.yml + # configure gitlab signup configuration sudo -u git -H sed 's/{{GITLAB_SIGNUP}}/'${GITLAB_SIGNUP}'/' -i /home/git/gitlab/config/gitlab.yml diff --git a/resources/setup/config/gitlabhq/gitlab.yml b/resources/setup/config/gitlabhq/gitlab.yml index 1dd32296..378c6039 100644 --- a/resources/setup/config/gitlabhq/gitlab.yml +++ b/resources/setup/config/gitlabhq/gitlab.yml @@ -195,7 +195,7 @@ production: &base receive_pack: true # If you use non-standard ssh port you need to specify it - # ssh_port: 22 + ssh_port: {{GITLAB_SHELL_SSH_PORT}} ## Git settings # CAUTION!