This repository has been archived on 2021-10-24. You can view files and clone it, but cannot push or open issues or pull requests.
greenlight/config/storage.yml

45 lines
1.5 KiB
YAML

test:
service: Disk
root: <%= Rails.root.join("tmp/storage") %>
local:
service: Disk
root: <%= Rails.root.join("storage") %>
# Use rails credentials:edit to set the AWS secrets (as aws:access_key_id|secret_access_key)
amazon:
service: S3
access_key_id: <%= ENV['AWS_ACCESS_KEY_ID'] %>
secret_access_key: <%= ENV['AWS_SECRET_ACCESS_KEY'] %>
region: <%= ENV['AWS_REGION'] %>
bucket: <%= ENV['AWS_BUCKET'] %>
# Remember not to checkin your GCS keyfile to a repository
google:
service: GCS
project: "<%= ENV['GCS_PROJECT'] %>"
bucket: "<%= ENV['GCS_BUCKET'] %>"
credentials:
type: 'service_account'
project_id: "<%= ENV['GCS_PROJECT_ID'] %>"
private_key_id: "<%= ENV['GCS_PRIVATE_KEY_ID'] %>"
private_key: "<%= ENV['GCS_PRIVATE_KEY']&.lines&.join("\\n") %>"
client_email: "<%= ENV['GCS_CLIENT_EMAIL'] %>"
client_id: "<%= ENV['GCS_CLIENT_ID'] %>"
auth_uri: 'https://accounts.google.com/o/oauth2/auth'
token_uri: 'https://accounts.google.com/o/oauth2/token'
auth_provider_x509_cert_url: 'https://www.googleapis.com/oauth2/v1/certs'
client_x509_cert_url: "<%= ENV['GCS_CLIENT_CERT'] %>"
# Use rails credentials:edit to set the Azure Storage secret (as azure_storage:storage_access_key)
# microsoft:
# service: AzureStorage
# storage_account_name: your_account_name
# storage_access_key: <%= Rails.application.credentials.dig(:azure_storage, :storage_access_key) %>
# container: your_container_name
# mirror:
# service: Mirror
# primary: local
# mirrors: [ amazon, google, microsoft ]