Skip to content
This repository has been archived by the owner on Jul 2, 2024. It is now read-only.

Commit

Permalink
Update storage.yml
Browse files Browse the repository at this point in the history
Add back in the config for the other envs
  • Loading branch information
matthewford committed Sep 26, 2023
1 parent 0cc33d6 commit 686cc23
Showing 1 changed file with 35 additions and 41 deletions.
76 changes: 35 additions & 41 deletions config/storage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,54 +6,48 @@ local:
service: Disk
root: <%= Rails.root.join("storage") %>

research:
service: S3
access_key_id: <%= Rails.env.research? ? ENV['AWS_ACCESS_KEY'] : "" %>
secret_access_key: <%= Rails.env.research? ? ENV['AWS_SECRET_KEY'] : "" %>
region: <%= Rails.env.research? ? ENV['AWS_REGION'] : "" %>
bucket: <%= Rails.env.research? ? ENV['AWS_BUCKET'] : "" %>

# research:
# service: S3
# access_key_id: <%= Rails.env.research? ? ENV.fetch('AWS_ACCESS_KEY') : "" %>
# secret_access_key: <%= Rails.env.research? ? ENV.fetch('AWS_SECRET_KEY') : "" %>
# region: <%= Rails.env.research? ? CF::App::Credentials.find_by_service_label('aws-s3-bucket')['aws_region'] : "" %>
# bucket: <%= Rails.env.research? ? CF::App::Credentials.find_by_service_label('aws-s3-bucket')['bucket_name'] : "" %>

# # Rails tries to read this on all environments and expects a string value
# staging:
# service: S3
# access_key_id: <%= Rails.env.staging? ? ENV.fetch('AWS_ACCESS_KEY') : "" %>
# secret_access_key: <%= Rails.env.staging? ? ENV.fetch('AWS_SECRET_KEY') : "" %>
# region: <%= Rails.env.staging? ? CF::App::Credentials.find_by_service_label('aws-s3-bucket')['aws_region'] : "" %>
# bucket: <%= Rails.env.staging? ? CF::App::Credentials.find_by_service_label('aws-s3-bucket')['bucket_name'] : "" %>
staging:
service: S3
access_key_id: <%= Rails.env.staging? ? ENV['AWS_ACCESS_KEY'] : "" %>
secret_access_key: <%= Rails.env.staging? ? ENV['AWS_SECRET_KEY'] : "" %>
region: <%= Rails.env.staging? ? ENV['AWS_REGION'] : "" %>
bucket: <%= Rails.env.staging? ? ENV['AWS_BUCKET'] : "" %>

# Rails tries to read this on all environments and expects a string value
training:
service: S3
access_key_id: <%= Rails.env.training? ? ENV.fetch('AWS_ACCESS_KEY') : "" %>
secret_access_key: <%= Rails.env.training? ? ENV.fetch('AWS_SECRET_KEY') : "" %>
region: <%= Rails.env.training? ? ENV.fetch('AWS_REGION') : "" %>
bucket: <%= Rails.env.training? ? ENV.fetch('AWS_BUCKET') : "" %>

# Rails tries to read this on all environments and expects a string value
# uat:
# service: S3
# access_key_id: <%= Rails.env.uat? ? ENV.fetch('AWS_ACCESS_KEY') : "" %>
# secret_access_key: <%= Rails.env.uat? ? ENV.fetch('AWS_SECRET_KEY') : "" %>
# region: <%= Rails.env.uat? ? CF::App::Credentials.find_by_service_label('aws-s3-bucket')['aws_region'] : "" %>
# bucket: <%= Rails.env.uat? ? CF::App::Credentials.find_by_service_label('aws-s3-bucket')['bucket_name'] : "" %>
access_key_id: <%= Rails.env.training? ? ENV['AWS_ACCESS_KEY'] : "" %>
secret_access_key: <%= Rails.env.training? ? ENV['AWS_SECRET_KEY'] : "" %>
region: <%= Rails.env.training? ? ENV['AWS_REGION'] : "" %>
bucket: <%= Rails.env.training? ? ENV['AWS_BUCKET'] : "" %>

# # Rails tries to read this on all environments and expects a string value
# civmiguat:
# service: S3
# access_key_id: <%= Rails.env.civmiguat? ? ENV.fetch('AWS_ACCESS_KEY') : "" %>
# secret_access_key: <%= Rails.env.civmiguat? ? ENV.fetch('AWS_SECRET_KEY') : "" %>
# region: <%= Rails.env.civmiguat? ? CF::App::Credentials.find_by_service_label('aws-s3-bucket')['aws_region'] : "" %>
# bucket: <%= Rails.env.civmiguat? ? CF::App::Credentials.find_by_service_label('aws-s3-bucket')['bucket_name'] : "" %>
uat:
service: S3
access_key_id: <%= Rails.env.uat? ? ENV['AWS_ACCESS_KEY'] : "" %>
secret_access_key: <%= Rails.env.uat? ? ENV['AWS_SECRET_KEY'] : "" %>
region: <%= Rails.env.uat? ? ENV['AWS_REGION'] : "" %>
bucket: <%= Rails.env.uat? ? ENV['AWS_BUCKET'] : "" %>

# # Rails tries to read this on all environments and expects a string value
# production:
# service: S3
# access_key_id: <%= Rails.env.production? ? ENV.fetch('AWS_ACCESS_KEY') : "" %>
# secret_access_key: <%= Rails.env.production? ? ENV.fetch('AWS_SECRET_KEY') : "" %>
# region: <%= Rails.env.production? ? CF::App::Credentials.find_by_service_label('aws-s3-bucket')['aws_region'] : "" %>
# bucket: <%= Rails.env.production? ? CF::App::Credentials.find_by_service_label('aws-s3-bucket')['bucket_name'] : "" %>
civmiguat:
service: S3
access_key_id: <%= Rails.env.civmiguat? ? ENV['AWS_ACCESS_KEY'] : "" %>
secret_access_key: <%= Rails.env.civmiguat? ? ENV['AWS_SECRET_KEY'] : "" %>
region: <%= Rails.env.civmiguat? ? ENV['AWS_REGION'] : "" %>
bucket: <%= Rails.env.civmiguat? ? ENV['AWS_BUCKET'] : "" %>

production:
service: S3
access_key_id: <%= Rails.env.production? ? ENV['AWS_ACCESS_KEY'] : "" %>
secret_access_key: <%= Rails.env.production? ? ENV['AWS_SECRET_KEY'] : "" %>
region: <%= Rails.env.production? ? ENV['AWS_REGION'] : "" %>
bucket: <%= Rails.env.production? ? ENV['AWS_BUCKET'] : "" %>

# Remember not to checkin your GCS keyfile to a repository
# google:
# service: GCS
Expand Down

0 comments on commit 686cc23

Please sign in to comment.