-
Notifications
You must be signed in to change notification settings - Fork 129
Google Cloud setup
Eric Carmichael edited this page Apr 10, 2018
·
13 revisions
NOTE: You need to be on the google-cloud-storage
branch to use Google Cloud Storage
Create 2 buckets, 1 public and 1 private, for example:
coda-private
coda-public
Set bucket permissions so it is not publicly readable.
Set this CORS configuration:
[
{
"origin": ["*"],
"responseHeader": ["Content-Type"],
"method": ["GET", "PUT", "OPTIONS", "HEAD"],
"maxAgeSeconds": 3600
}
]
Set the public to publicly readable by all users:
Add these lines to your .env
, replacing any other storage configuration:
# Google Cloud Storage
DEFAULT_FILE_STORAGE=apps.web.storage.CodalabGoogleCloudStorage
GS_PUBLIC_BUCKET_NAME=coda-public
GS_PRIVATE_BUCKET_NAME=coda-private
GOOGLE_APPLICATION_CREDENTIALS=/app/certs/google-storage-api.json
This assumes your google-storage-api.json
api credentials are in the <project root>/certs
directory.