Created
July 19, 2017 11:45
-
-
Save akshaymohite/287a04a1f4eb31e3f468e71163caec68 to your computer and use it in GitHub Desktop.
ActiveStorage: storage_services.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
test: | |
service: Disk | |
root: <%= Rails.root.join("tmp/storage") %> | |
local: | |
service: Disk | |
root: <%= Rails.root.join("storage") %> | |
amazon: | |
service: S3 | |
access_key_id: <%= Rails.application.secrets.dig(:aws, :access_key_id) %> | |
secret_access_key: <%= Rails.application.secrets.dig(:aws, :secret_access_key) %> | |
region: us-east-1 | |
bucket: your_own_bucket | |
google: | |
service: GCS | |
project: your_project | |
keyfile: <%= Rails.root.join("path/to/gcs.keyfile") %> | |
bucket: your_own_bucket | |
mirror: | |
service: Mirror | |
primary: local | |
secondaries: [ amazon, google ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Cheers for this Akshay, but I have a question: when deploying for production, how will it access the gcs.keyfile (unless you check it into version control)? persumably we do not want to check our gcs secrets into version control? advice much appreciated