Skip to content

Instantly share code, notes, and snippets.

@nickjacob
Created July 30, 2016 17:31
Show Gist options
  • Select an option

  • Save nickjacob/acc3694e624f42a05db3b3829304330d to your computer and use it in GitHub Desktop.

Select an option

Save nickjacob/acc3694e624f42a05db3b3829304330d to your computer and use it in GitHub Desktop.

Revisions

  1. Nick Jacob created this gist Jul 30, 2016.
    28 changes: 28 additions & 0 deletions deploy.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,28 @@
    // you can use Google Cloud storage's interoperability functionality
    // to use the standard aws-sdk adapter in ember-cli-deploy-s3.
    module.exports = function(deployTarget) {
    // make your own client so yo ucan set the 'endpoint' to google
    var googUploadClient = new AWS.S3({
    endpoint: 'https://storage.googleapis.com',
    accessKeyId: process.env.GOOGLE_ACCESS_KEY,
    secretAccessKey: process.env.GOOGLE_SECRET_KEY,
    bucket: '< your bucket name >',
    region: 'us-east-1', // won't affect anything in google cloud
    signatureVersion: 's3', // the default is v4 -- google expects the "s3" signing method
    });

    var ENV = {
    build: {},
    redis: {
    allowOverwrite: true,
    keyPrefix: '< your prefix >'
    },
    s3: {
    prefix: 'frontend',
    s3Client: googUploadClient,
    bucket: '<your bucket name>',
    accessKeyId: process.env.GOOGLE_ACCESS_KEY,
    secretAccessKey: process.env.GOOGLE_SECRET_KEY,
    },
    };
    };