summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzegorz@gitlab.com>2018-04-05 11:10:55 +0000
committerGrzegorz Bizon <grzegorz@gitlab.com>2018-04-05 11:10:55 +0000
commit21488c74223524aee9ee6e1fb5274a2d8dec7cb2 (patch)
tree950c4f932360f0d4b49299962cc4bd02152a762b /config
parent2dbcb9cb37990c43c2065b3ff26b6564d43cac4c (diff)
parent9dde7df2470cc3fe7989de163fe3985d53262a0d (diff)
downloadgitlab-ce-21488c74223524aee9ee6e1fb5274a2d8dec7cb2.tar.gz
Merge branch 'direct-upload-of-uploads' into 'master'
Allow to store uploads by default on Object Storage See merge request gitlab-org/gitlab-ce!18156
Diffstat (limited to 'config')
-rw-r--r--config/gitlab.yml.example28
-rw-r--r--config/initializers/1_settings.rb1
2 files changed, 16 insertions, 13 deletions
diff --git a/config/gitlab.yml.example b/config/gitlab.yml.example
index 126a9b8b803..8c39a1f2aa9 100644
--- a/config/gitlab.yml.example
+++ b/config/gitlab.yml.example
@@ -154,7 +154,7 @@ production: &base
# provider: AWS # Only AWS supported at the moment
# aws_access_key_id: AWS_ACCESS_KEY_ID
# aws_secret_access_key: AWS_SECRET_ACCESS_KEY
- # region: eu-central-1
+ # region: us-east-1
## Git LFS
lfs:
@@ -164,13 +164,14 @@ production: &base
object_store:
enabled: false
remote_directory: lfs-objects # Bucket name
+ # direct_upload: false # Use Object Storage directly for uploads instead of background uploads if enabled (Default: false)
# background_upload: false # Temporary option to limit automatic upload (Default: true)
# proxy_download: false # Passthrough all downloads via GitLab instead of using Redirects to Object Storage
connection:
provider: AWS
aws_access_key_id: AWS_ACCESS_KEY_ID
aws_secret_access_key: AWS_SECRET_ACCESS_KEY
- region: eu-central-1
+ region: us-east-1
# Use the following options to configure an AWS compatible host
# host: 'localhost' # default: s3.amazonaws.com
# endpoint: 'http://127.0.0.1:9000' # default: nil
@@ -183,17 +184,18 @@ production: &base
# base_dir: uploads/-/system
object_store:
enabled: false
- # remote_directory: uploads # Bucket name
- # background_upload: false # Temporary option to limit automatic upload (Default: true)
- # proxy_download: false # Passthrough all downloads via GitLab instead of using Redirects to Object Storage
- # connection:
- # provider: AWS
- # aws_access_key_id: AWS_ACCESS_KEY_ID
- # aws_secret_access_key: AWS_SECRET_ACCESS_KEY
- # region: eu-central-1
- # host: 'localhost' # default: s3.amazonaws.com
- # endpoint: 'http://127.0.0.1:9000' # default: nil
- # path_style: true # Use 'host/bucket_name/object' instead of 'bucket_name.host/object'
+ # remote_directory: uploads # Bucket name
+ # direct_upload: false # Use Object Storage directly for uploads instead of background uploads if enabled (Default: false)
+ # background_upload: false # Temporary option to limit automatic upload (Default: true)
+ # proxy_download: false # Passthrough all downloads via GitLab instead of using Redirects to Object Storage
+ connection:
+ provider: AWS
+ aws_access_key_id: AWS_ACCESS_KEY_ID
+ aws_secret_access_key: AWS_SECRET_ACCESS_KEY
+ region: us-east-1
+ # host: 'localhost' # default: s3.amazonaws.com
+ # endpoint: 'http://127.0.0.1:9000' # default: nil
+ # path_style: true # Use 'host/bucket_name/object' instead of 'bucket_name.host/object'
## GitLab Pages
pages:
diff --git a/config/initializers/1_settings.rb b/config/initializers/1_settings.rb
index 187e70868ea..7bb863e2278 100644
--- a/config/initializers/1_settings.rb
+++ b/config/initializers/1_settings.rb
@@ -365,6 +365,7 @@ Settings.uploads['base_dir'] = Settings.uploads['base_dir'] || 'uploads/-/system
Settings.uploads['object_store'] ||= Settingslogic.new({})
Settings.uploads['object_store']['enabled'] = false if Settings.uploads['object_store']['enabled'].nil?
Settings.uploads['object_store']['remote_directory'] ||= 'uploads'
+Settings.uploads['object_store']['direct_upload'] = false if Settings.uploads['object_store']['direct_upload'].nil?
Settings.uploads['object_store']['background_upload'] = true if Settings.uploads['object_store']['background_upload'].nil?
Settings.uploads['object_store']['proxy_download'] = false if Settings.uploads['object_store']['proxy_download'].nil?
# Convert upload connection settings to use string keys, to make Fog happy