From ee59d938ee0290cb076f7a4e86870d9cf43e3738 Mon Sep 17 00:00:00 2001 From: ngentile Date: Mon, 27 Apr 2015 17:43:31 -0400 Subject: [PATCH 1/2] Add configuration parameter for git timeout value defaulting to 10 seconds --- README.md | 1 + assets/config/gitlabhq/gitlab.yml | 4 ++-- assets/init | 4 ++++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7dae9117..469885d0 100644 --- a/README.md +++ b/README.md @@ -713,6 +713,7 @@ Below is the complete list of available options that can be used to customize yo - **GITLAB_PROJECTS_VISIBILITY**: Set default projects visibility level. Possible values `public`, `private` and `internal`. Defaults to `private`. - **GITLAB_WEBHOOK_TIMEOUT**: Sets the timeout for webhooks. Defaults to `10` seconds. - **GITLAB_SATELLITES_TIMEOUT**: Sets the timeout for satellites. Defaults to `30` seconds. +- **GIT_TIMEOUT**: Sets the timeout for git commands. Defaults to `10` seconds. - **GITLAB_BACKUP_DIR**: The backup folder in the container. Defaults to `/home/git/data/backups` - **GITLAB_BACKUPS**: Setup cron job to automatic backups. Possible values `disable`, `daily`, `weekly` or `monthly`. Disabled by default - **GITLAB_BACKUP_EXPIRY**: Configure how long (in seconds) to keep backups before they are deleted. By default when automated backups are disabled backups are kept forever (0 seconds), else the backups expire in 7 days (604800 seconds). diff --git a/assets/config/gitlabhq/gitlab.yml b/assets/config/gitlabhq/gitlab.yml index 292a29b8..473d3bf8 100644 --- a/assets/config/gitlabhq/gitlab.yml +++ b/assets/config/gitlabhq/gitlab.yml @@ -147,7 +147,7 @@ production: &base allow_username_or_email_login: {{LDAP_ALLOW_USERNAME_OR_EMAIL_LOGIN}} # To maintain tight control over the number of active users on your GitLab installation, - # enable this setting to keep new users blocked until they have been cleared by the admin + # enable this setting to keep new users blocked until they have been cleared by the admin # (default: false). block_auto_created_users: {{LDAP_BLOCK_AUTO_CREATED_USERS}} @@ -260,7 +260,7 @@ production: &base # This value can be increased if you have very large commits max_size: {{GITLAB_MAX_SIZE}} # 20.megabytes # Git timeout to read a commit, in seconds - timeout: 10 + timeout: {{GIT_TIMEOUT}} # # 4. Extra customization diff --git a/assets/init b/assets/init index 212019ab..71826ed8 100755 --- a/assets/init +++ b/assets/init @@ -32,6 +32,7 @@ GITLAB_PROJECTS_VISIBILITY=${GITLAB_PROJECTS_VISIBILITY:-private} GITLAB_RELATIVE_URL_ROOT=${GITLAB_RELATIVE_URL_ROOT:-} GITLAB_WEBHOOK_TIMEOUT=${GITLAB_WEBHOOK_TIMEOUT:-10} GITLAB_SATELLITES_TIMEOUT=${GITLAB_SATELLITES_TIMEOUT:-30} +GIT_TIMEOUT=${GIT_TIMEOUT:-10} SSL_SELF_SIGNED=${SSL_SELF_SIGNED:-false} SSL_CERTIFICATE_PATH=${SSL_CERTIFICATE_PATH:-$GITLAB_DATA_DIR/certs/gitlab.crt} @@ -425,6 +426,9 @@ sudo -u git -H sed 's/{{GITLAB_WEBHOOK_TIMEOUT}}/'"${GITLAB_WEBHOOK_TIMEOUT}"'/' # configure gitlab satellite timeout sudo -u git -H sed 's/{{GITLAB_SATELLITES_TIMEOUT}}/'"${GITLAB_SATELLITES_TIMEOUT}"'/' -i config/gitlab.yml +# configure git timeout +sudo -u git -H sed 's/{{GIT_TIMEOUT}}/'"${GIT_TIMEOUT}"'/' -i config/gitlab.yml + # configure database if [ "${DB_TYPE}" == "postgres" ]; then sudo -u git -H sed 's/{{DB_ADAPTER}}/postgresql/' -i config/database.yml From c4254465ac0dbcc32eaab9cc53a24ee589fc7ea2 Mon Sep 17 00:00:00 2001 From: ngentile Date: Tue, 28 Apr 2015 11:30:58 -0400 Subject: [PATCH 2/2] rename GIT_TIMEOUT -> GITLAB_TIMEOUT --- README.md | 2 +- assets/config/gitlabhq/gitlab.yml | 2 +- assets/init | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 469885d0..07cd15b2 100644 --- a/README.md +++ b/README.md @@ -713,7 +713,7 @@ Below is the complete list of available options that can be used to customize yo - **GITLAB_PROJECTS_VISIBILITY**: Set default projects visibility level. Possible values `public`, `private` and `internal`. Defaults to `private`. - **GITLAB_WEBHOOK_TIMEOUT**: Sets the timeout for webhooks. Defaults to `10` seconds. - **GITLAB_SATELLITES_TIMEOUT**: Sets the timeout for satellites. Defaults to `30` seconds. -- **GIT_TIMEOUT**: Sets the timeout for git commands. Defaults to `10` seconds. +- **GITLAB_TIMEOUT**: Sets the timeout for git commands. Defaults to `10` seconds. - **GITLAB_BACKUP_DIR**: The backup folder in the container. Defaults to `/home/git/data/backups` - **GITLAB_BACKUPS**: Setup cron job to automatic backups. Possible values `disable`, `daily`, `weekly` or `monthly`. Disabled by default - **GITLAB_BACKUP_EXPIRY**: Configure how long (in seconds) to keep backups before they are deleted. By default when automated backups are disabled backups are kept forever (0 seconds), else the backups expire in 7 days (604800 seconds). diff --git a/assets/config/gitlabhq/gitlab.yml b/assets/config/gitlabhq/gitlab.yml index 473d3bf8..c94df819 100644 --- a/assets/config/gitlabhq/gitlab.yml +++ b/assets/config/gitlabhq/gitlab.yml @@ -260,7 +260,7 @@ production: &base # This value can be increased if you have very large commits max_size: {{GITLAB_MAX_SIZE}} # 20.megabytes # Git timeout to read a commit, in seconds - timeout: {{GIT_TIMEOUT}} + timeout: {{GITLAB_TIMEOUT}} # # 4. Extra customization diff --git a/assets/init b/assets/init index 71826ed8..2a96c90b 100755 --- a/assets/init +++ b/assets/init @@ -32,7 +32,7 @@ GITLAB_PROJECTS_VISIBILITY=${GITLAB_PROJECTS_VISIBILITY:-private} GITLAB_RELATIVE_URL_ROOT=${GITLAB_RELATIVE_URL_ROOT:-} GITLAB_WEBHOOK_TIMEOUT=${GITLAB_WEBHOOK_TIMEOUT:-10} GITLAB_SATELLITES_TIMEOUT=${GITLAB_SATELLITES_TIMEOUT:-30} -GIT_TIMEOUT=${GIT_TIMEOUT:-10} +GITLAB_TIMEOUT=${GITLAB_TIMEOUT:-10} SSL_SELF_SIGNED=${SSL_SELF_SIGNED:-false} SSL_CERTIFICATE_PATH=${SSL_CERTIFICATE_PATH:-$GITLAB_DATA_DIR/certs/gitlab.crt} @@ -427,7 +427,7 @@ sudo -u git -H sed 's/{{GITLAB_WEBHOOK_TIMEOUT}}/'"${GITLAB_WEBHOOK_TIMEOUT}"'/' sudo -u git -H sed 's/{{GITLAB_SATELLITES_TIMEOUT}}/'"${GITLAB_SATELLITES_TIMEOUT}"'/' -i config/gitlab.yml # configure git timeout -sudo -u git -H sed 's/{{GIT_TIMEOUT}}/'"${GIT_TIMEOUT}"'/' -i config/gitlab.yml +sudo -u git -H sed 's/{{GITLAB_TIMEOUT}}/'"${GITLAB_TIMEOUT}"'/' -i config/gitlab.yml # configure database if [ "${DB_TYPE}" == "postgres" ]; then