summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-10-29 11:06:03 +0000
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-10-29 11:06:03 +0000
commitead3ffd7a516911458d84311c4f1b4153f1071b5 (patch)
treeea969651286207e9997ec3bdb3838911f79b139d /config
parentae99720a40b8e0700891f5828c1a93bcc7673e04 (diff)
parent5ff830cf32908c0efc156e439a0486cfb40eeadb (diff)
downloadgitlab-ce-ead3ffd7a516911458d84311c4f1b4153f1071b5.tar.gz
Merge branch 'shared-file-access' into 'master'
Start putting shared files in "shared" See merge request !1691
Diffstat (limited to 'config')
-rw-r--r--config/gitlab.yml.example4
-rw-r--r--config/initializers/1_settings.rb6
2 files changed, 9 insertions, 1 deletions
diff --git a/config/gitlab.yml.example b/config/gitlab.yml.example
index d3aef44705b..e297f393e3d 100644
--- a/config/gitlab.yml.example
+++ b/config/gitlab.yml.example
@@ -310,6 +310,10 @@ production: &base
# application_name: 'YOUR_APP_NAME',
# application_password: 'YOUR_APP_PASSWORD' } }
+ # Shared file storage settings
+ shared:
+ # path: /mnt/gitlab # Default: shared
+
diff --git a/config/initializers/1_settings.rb b/config/initializers/1_settings.rb
index 65e9b0dcb50..c189c88bdcb 100644
--- a/config/initializers/1_settings.rb
+++ b/config/initializers/1_settings.rb
@@ -125,6 +125,9 @@ Settings.omniauth['auto_link_ldap_user'] = false if Settings.omniauth['auto_link
Settings.omniauth['providers'] ||= []
+Settings['shared'] ||= Settingslogic.new({})
+Settings.shared['path'] = File.expand_path(Settings.shared['path'] || "shared", Rails.root)
+
Settings['issues_tracker'] ||= {}
#
@@ -169,7 +172,7 @@ Settings.gitlab.default_projects_features['merge_requests'] = true if Settings.g
Settings.gitlab.default_projects_features['wiki'] = true if Settings.gitlab.default_projects_features['wiki'].nil?
Settings.gitlab.default_projects_features['snippets'] = false if Settings.gitlab.default_projects_features['snippets'].nil?
Settings.gitlab.default_projects_features['visibility_level'] = Settings.send(:verify_constant, Gitlab::VisibilityLevel, Settings.gitlab.default_projects_features['visibility_level'], Gitlab::VisibilityLevel::PRIVATE)
-Settings.gitlab['repository_downloads_path'] = File.absolute_path(Settings.gitlab['repository_downloads_path'] || 'tmp/repositories', Rails.root)
+Settings.gitlab['repository_downloads_path'] = File.join(Settings.shared['path'], 'cache/archive') if Settings.gitlab['repository_downloads_path'].nil?
Settings.gitlab['restricted_signup_domains'] ||= []
Settings.gitlab['import_sources'] ||= ['github','bitbucket','gitlab','gitorious','google_code','fogbugz','git']
@@ -248,6 +251,7 @@ Settings.git['timeout'] ||= 10
Settings['satellites'] ||= Settingslogic.new({})
Settings.satellites['path'] = File.expand_path(Settings.satellites['path'] || "tmp/repo_satellites/", Rails.root)
+
#
# Extra customization
#