Skip to content

Commit

Permalink
Merge branch 'upgrade_decidim_028' into staging
Browse files Browse the repository at this point in the history
* upgrade_decidim_028:
  Update storage configuration to get secrets properly
  • Loading branch information
entantoencuanto committed Jul 19, 2024
2 parents a25e83b + 4b7421a commit 5767888
Showing 1 changed file with 23 additions and 16 deletions.
39 changes: 23 additions & 16 deletions config/storage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,35 @@ 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: <%= Rails.application.secrets.aws_access_key_id %>
secret_access_key: <%= Rails.application.secrets.aws_secret_access_key %>
access_key_id: <%= Rails.application.secrets.dig(:storage, :s3, :access_key_id) %>
secret_access_key: <%= Rails.application.secrets.dig(:storage, :s3, :secret_access_key) %>
region: eu-west-1
bucket: <%= Rails.application.secrets.aws_bucket %>
bucket: <%= Rails.application.secrets.dig(:storage, :s3, :bucket) %>
public: true

# Remember not to checkin your GCS keyfile to a repository
# google:
# service: GCS
# project: your_project
# credentials: <%= Rails.root.join("path/to/gcs.keyfile") %>
# bucket: your_own_bucket
azure:
service: AzureStorage
storage_account_name: <%= Rails.application.secrets.dig(:storage, :azure, :storage_account_name) %>
storage_access_key: <%= Rails.application.secrets.dig(:storage, :azure, :storage_access_key) %>
container: <%= Rails.application.secrets.dig(:storage, :azure, :container) %>

# 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
gcs:
service: GCS
project: <%= Rails.application.secrets.dig(:storage, :gcs, :project) %>
bucket: <%= Rails.application.secrets.dig(:storage, :gcs, :bucket) %>
credentials:
type: <%= Rails.application.secrets.dig(:storage, :gcs, :type) %>
project_id: <%= Rails.application.secrets.dig(:storage, :gcs, :project_id) %>
private_key_id: <%= Rails.application.secrets.dig(:storage, :gcs, :private_key_id) %>
private_key: <%= Rails.application.secrets.dig(:storage, :gcs, :private_key) %>
client_email: <%= Rails.application.secrets.dig(:storage, :gcs, :client_email) %>
client_id: <%= Rails.application.secrets.dig(:storage, :gcs, :client_id) %>
auth_uri: <%= Rails.application.secrets.dig(:storage, :gcs, :auth_uri) %>
token_uri: <%= Rails.application.secrets.dig(:storage, :gcs, :token_uri) %>
auth_provider_x509_cert_url: <%= Rails.application.secrets.dig(:storage, :gcs, :auth_provider_x509_cert_url) %>
client_x509_cert_url: <%= Rails.application.secrets.dig(:storage, :gcs, :client_x509_cert_url) %>

# mirror:
# service: Mirror
Expand Down

0 comments on commit 5767888

Please sign in to comment.