diff options
author | Stan Hu <stanhu@gmail.com> | 2018-06-29 19:45:48 +0300 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2018-06-29 19:46:43 +0300 |
commit | 4dc57242077b69f2cd2ddd88b86f04f43b8eab81 (patch) | |
tree | eeed0054de8677dc1b81bcc4e0d28c180ac13951 /config | |
parent | 70cf3bff18e358beaff9efc52906748636718d99 (diff) |
Remove CarrierWave initializer
This is stale and no longer used. Object storage is now configured
in each specific gitlab.yml section (e.g. uploads, lfs, etc.).
Part of gitlab-org/omnibus-gitlab#3641
Diffstat (limited to 'config')
-rw-r--r-- | config/aws.yml.example | 22 | ||||
-rw-r--r-- | config/initializers/carrierwave.rb | 31 |
2 files changed, 0 insertions, 53 deletions
diff --git a/config/aws.yml.example b/config/aws.yml.example deleted file mode 100644 index bb10c3cec7b..00000000000 --- a/config/aws.yml.example +++ /dev/null @@ -1,22 +0,0 @@ -# See https://github.com/jnicklas/carrierwave#using-amazon-s3 -# for more options -# If you change this file in a Merge Request, please also create -# a Merge Request on https://gitlab.com/gitlab-org/omnibus-gitlab/merge_requests -# -production: - access_key_id: AKIA1111111111111UA - secret_access_key: secret - bucket: mygitlab.production.us - region: us-east-1 - -development: - access_key_id: AKIA1111111111111UA - secret_access_key: secret - bucket: mygitlab.development.us - region: us-east-1 - -test: - access_key_id: AKIA1111111111111UA - secret_access_key: secret - bucket: mygitlab.test.us - region: us-east-1 diff --git a/config/initializers/carrierwave.rb b/config/initializers/carrierwave.rb deleted file mode 100644 index 5cde6cbb0ff..00000000000 --- a/config/initializers/carrierwave.rb +++ /dev/null @@ -1,31 +0,0 @@ -CarrierWave::SanitizedFile.sanitize_regexp = /[^[:word:]\.\-\+]/ - -aws_file = Rails.root.join('config', 'aws.yml') - -if File.exist?(aws_file) - AWS_CONFIG = YAML.load(File.read(aws_file))[Rails.env] - - CarrierWave.configure do |config| - config.fog_provider = 'fog/aws' - - config.fog_credentials = { - provider: 'AWS', # required - aws_access_key_id: AWS_CONFIG['access_key_id'], # required - aws_secret_access_key: AWS_CONFIG['secret_access_key'], # required - region: AWS_CONFIG['region'], # optional, defaults to 'us-east-1' - } - - # required - config.fog_directory = AWS_CONFIG['bucket'] - - # optional, defaults to true - config.fog_public = false - - # optional, defaults to {} - config.fog_attributes = { 'Cache-Control' => 'max-age=315576000' } - - # optional time (in seconds) that authenticated urls will be valid. - # when fog_public is false and provider is AWS or Google, defaults to 600 - config.fog_authenticated_url_expiration = 1 << 29 - end -end |