Skip to content

Instantly share code, notes, and snippets.

@j-mcnally
Created August 16, 2015 05:44
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save j-mcnally/2bf51ef6d9e51f9558f5 to your computer and use it in GitHub Desktop.
Save j-mcnally/2bf51ef6d9e51f9558f5 to your computer and use it in GitHub Desktop.
Using ember-deploy-s3 with Google Cloud Storage
module.exports = {
production: {
buildEnv: 'production', // Override the environment passed to the ember asset build. Defaults to 'production'
store: {
type: "S3",
accessKeyId: "XXX",
secretAccessKey: "XXX",
bucket: "bucket-index",
acl: 'public-read', //optional, e.g. 'public-read', if ACL is not configured, it is not sent
endpoint: "storage.googleapis.com",
hostName: "storage.googleapis.com/bucket-index/", // To be set with 'direct' indexMode
indexMode: "indirect", // Optional: 'direct' or 'indirect', 'direct' is used by default.
prefix: "production/" // Optional: Allows a folder setup within the bucket, so that multiple apps can be stored in one bucket (or maybe things like A/B testing grouped together). Use with 'indirect' indexMode only.
},
assets: {
type: "s3",
endpoint: "storage.googleapis.com",
accessKeyId: "XXX",
secretAccessKey: "XXX",
bucket: "my_bucket"
}
}
};

Google Cloud Storage

You can use the ember-deploy-s3 and ember-deploy-s3-index addons with Google Cloud Storage by using interop tokens and the specifying endpoint in the configuration.

Google has a mode that mimics S3.

Interop token

Tokens about this token and how to generate it can be found https://cloud.google.com/storage/docs/migrating#migration-simple

Configuration

Add endpoint: "storage.googleapis.com" to each of the config blocks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment