diff --git a/Changelog.md b/Changelog.md index bb8a0482..61181329 100644 --- a/Changelog.md +++ b/Changelog.md @@ -2,6 +2,9 @@ This file only reflects the changes that are made in this image. Please refer to the upstream GitLab [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) for the list of changes in GitLab. +**latest** +- added `GITLAB_DOWNLOADS_DIR` configuration parameter + **8.2.1-1** - fixed typo while setting the value of `GITLAB_ARTIFACTS_DIR` diff --git a/README.md b/README.md index 637a7ceb..fef7fffb 100644 --- a/README.md +++ b/README.md @@ -776,6 +776,7 @@ Below is the complete list of available options that can be used to customize yo - **GITLAB_REPOS_DIR**: The git repositories folder in the container. Defaults to `/home/git/data/repositories` - **GITLAB_BACKUP_DIR**: The backup folder in the container. Defaults to `/home/git/data/backups` - **GITLAB_BUILDS_DIR**: The build traces directory. Defaults to `/home/git/data/builds` +- **GITLAB_DOWNLOADS_DIR**: The repository downloads directory. A temporary zip is created in this directory when users click **Download Zip** on a project. Defaults to `/home/git/data/tmp/downloads`. - **GITLAB_SHARED_DIR**: The directory to store the build artifacts. Defaults to `/home/git/data/shared` - **GITLAB_ARTIFACTS_ENABLED**: Enable/Disable GitLab artifacts support. Defaults to `true`. - **GITLAB_ARTIFACTS_DIR**: Directory to store the artifacts. Defaults to `$GITLAB_SHARED_DIR/artifacts` diff --git a/assets/runtime/config/gitlabhq/gitlab.yml b/assets/runtime/config/gitlabhq/gitlab.yml index a8acc442..c40e8b05 100644 --- a/assets/runtime/config/gitlabhq/gitlab.yml +++ b/assets/runtime/config/gitlabhq/gitlab.yml @@ -93,7 +93,7 @@ production: &base ## Repository downloads directory # When a user clicks e.g. 'Download zip' on a project, a temporary zip file is created in the following directory. # The default is 'tmp/repositories' relative to the root of the Rails app. - # repository_downloads_path: tmp/repositories + repository_downloads_path: {{GITLAB_DOWNLOADS_DIR}} ## Reply by email # Allow users to comment on issues and merge requests by replying to notification emails. diff --git a/assets/runtime/env-defaults b/assets/runtime/env-defaults index 47dbacf3..df606040 100644 --- a/assets/runtime/env-defaults +++ b/assets/runtime/env-defaults @@ -6,6 +6,7 @@ DEBUG=${DEBUG:-$DEBUG_ENTRYPOINT} GITLAB_BACKUP_DIR="${GITLAB_BACKUP_DIR:-$GITLAB_DATA_DIR/backups}" GITLAB_REPOS_DIR="${GITLAB_REPOS_DIR:-$GITLAB_DATA_DIR/repositories}" GITLAB_BUILDS_DIR="${GITLAB_BUILDS_DIR:-$GITLAB_DATA_DIR/builds}" +GITLAB_DOWNLOADS_DIR="${GITLAB_DOWNLOADS_DIR:-$GITLAB_DATA_DIR/tmp/downloads}" GITLAB_SHARED_DIR="${GITLAB_SHARED_DIR:-$GITLAB_DATA_DIR/shared}" GITLAB_HTTPS=${GITLAB_HTTPS:-false} diff --git a/assets/runtime/functions b/assets/runtime/functions index a46b81d2..538ee08d 100644 --- a/assets/runtime/functions +++ b/assets/runtime/functions @@ -767,6 +767,11 @@ initialize_datadir() { rm -rf ${GITLAB_INSTALL_DIR}/builds ln -sf ${GITLAB_BUILDS_DIR} ${GITLAB_INSTALL_DIR}/builds + # create downloads directory + mkdir -p ${GITLAB_DOWNLOADS_DIR} + chmod u+rwX ${GITLAB_DOWNLOADS_DIR} + chown ${GITLAB_USER}:${GITLAB_USER} ${GITLAB_DOWNLOADS_DIR} + # create shared directory mkdir -p ${GITLAB_SHARED_DIR} chmod u+rwX ${GITLAB_SHARED_DIR} @@ -824,6 +829,9 @@ sanitize_datadir() { chmod -R u+rwX ${GITLAB_BUILDS_DIR} chown -R ${GITLAB_USER}:${GITLAB_USER} ${GITLAB_BUILDS_DIR} + chmod -R u+rwX ${GITLAB_DOWNLOADS_DIR} + chown -R ${GITLAB_USER}:${GITLAB_USER} ${GITLAB_DOWNLOADS_DIR} + chmod -R u+rwX ${GITLAB_SHARED_DIR} chown -R ${GITLAB_USER}:${GITLAB_USER} ${GITLAB_SHARED_DIR} @@ -916,6 +924,7 @@ configure_gitlab() { exec_as_git sed -i 's|{{GITLAB_SHELL_INSTALL_DIR}}|'"${GITLAB_SHELL_INSTALL_DIR}"'|g' ${GITLAB_INSTALL_DIR}/config/gitlab.yml exec_as_git sed -i 's|{{GITLAB_DATA_DIR}}|'"${GITLAB_DATA_DIR}"'|g' ${GITLAB_INSTALL_DIR}/config/gitlab.yml exec_as_git sed -i 's|{{GITLAB_REPOS_DIR}}|'"${GITLAB_REPOS_DIR}"'|g' ${GITLAB_INSTALL_DIR}/config/gitlab.yml + exec_as_git sed -i 's|{{GITLAB_DOWNLOADS_DIR}}|'"${GITLAB_DOWNLOADS_DIR}"'|g' ${GITLAB_INSTALL_DIR}/config/gitlab.yml exec_as_git sed -i 's|{{GITLAB_SHARED_DIR}}|'"${GITLAB_SHARED_DIR}"'|g' ${GITLAB_INSTALL_DIR}/config/gitlab.yml exec_as_git sed -i 's|{{GITLAB_HOST}}|'"${GITLAB_HOST}"'|' ${GITLAB_INSTALL_DIR}/config/gitlab.yml