diff --git a/Changelog.md b/Changelog.md index 0c4ae936..39d28d85 100644 --- a/Changelog.md +++ b/Changelog.md @@ -9,6 +9,7 @@ This file only reflects the changes that are made in this image. Please refer to - added `GITLAB_SHARED_DIR` configuration parameter - added `GITLAB_LFS_OBJECTS_DIR` configuration parameter - added `GITLAB_PROJECTS_BUILDS` configuration parameter +- added `GITLAB_LFS_ENABLED` configuration parameter **8.1.4** - gitlab: upgrade to CE v8.1.4 diff --git a/README.md b/README.md index 1a9c4804..7a369d9d 100644 --- a/README.md +++ b/README.md @@ -769,6 +769,7 @@ Below is the complete list of available options that can be used to customize yo - **GITLAB_PROJECTS_BUILDS**: Set if *builds* feature should be enabled by default for new projects. Defaults is `true`. - **GITLAB_WEBHOOK_TIMEOUT**: Sets the timeout for webhooks. Defaults to `10` seconds. - **GITLAB_TIMEOUT**: Sets the timeout for git commands. Defaults to `10` seconds. +- **GITLAB_LFS_ENABLED**: Enable/Disable Git LFS support. Defaults to `true`. - **GITLAB_NOTIFY_ON_BROKEN_BUILDS**: Enable or disable broken build notification emails. Defaults to `true` - **GITLAB_NOTIFY_PUSHER**: Add pusher to recipients list of broken build notification emails. Defaults to `false` - **GITLAB_REPOS_DIR**: The git repositories folder in the container. Defaults to `/home/git/data/repositories` diff --git a/assets/runtime/config/gitlabhq/gitlab.yml b/assets/runtime/config/gitlabhq/gitlab.yml index 638a5205..2341113e 100644 --- a/assets/runtime/config/gitlabhq/gitlab.yml +++ b/assets/runtime/config/gitlabhq/gitlab.yml @@ -126,7 +126,7 @@ production: &base ## Git LFS lfs: - enabled: false + enabled: {{GITLAB_LFS_ENABLED}} # The location where LFS objects are stored (default: shared/lfs-objects). storage_path: {{GITLAB_LFS_OBJECTS_DIR}} diff --git a/assets/runtime/env-defaults b/assets/runtime/env-defaults index 781492dc..dce69098 100644 --- a/assets/runtime/env-defaults +++ b/assets/runtime/env-defaults @@ -62,6 +62,9 @@ GITLAB_RELATIVE_URL_ROOT=${GITLAB_RELATIVE_URL_ROOT:-} GITLAB_WEBHOOK_TIMEOUT=${GITLAB_WEBHOOK_TIMEOUT:-10} GITLAB_TIMEOUT=${GITLAB_TIMEOUT:-10} +## LFS +GITLAB_LFS_ENABLED=${GITLAB_LFS_ENABLED:-true} + GITLAB_SECRETS_DB_KEY_BASE=${GITLAB_SECRETS_DB_KEY_BASE:-} GITLAB_NOTIFY_ON_BROKEN_BUILDS=${GITLAB_NOTIFY_ON_BROKEN_BUILDS:-true} GITLAB_NOTIFY_PUSHER=${GITLAB_NOTIFY_PUSHER:-false} diff --git a/assets/runtime/functions b/assets/runtime/functions index d3869423..da1e323e 100644 --- a/assets/runtime/functions +++ b/assets/runtime/functions @@ -592,6 +592,7 @@ gitlab_configure_ci() { gitlab_configure_lfs() { echo "Configuring gitlab::lfs..." + exec_as_git sed -i 's/{{GITLAB_LFS_ENABLED}}/'"${GITLAB_LFS_ENABLED}"'/' ${GITLAB_INSTALL_DIR}/config/gitlab.yml exec_as_git sed -i 's,{{GITLAB_LFS_OBJECTS_DIR}},'"${GITLAB_LFS_OBJECTS_DIR}"',g' ${GITLAB_INSTALL_DIR}/config/gitlab.yml }