Skip to content

interexchange/heroku-google-application-credentials-buildpack

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

heroku-google-application-credentials-buildpack

Generates a Google credential file based on Heroku Config Vars.

This is useful when using a package such as @google-cloud/storage which loads credentials from a file instead of an environmental variable.

Usage

  1. Create Config Var GOOGLE_CREDENTIALS and include the json contents wrapped in single quotes, eg: '{"type":"...","key":"val"}'
  2. Create Config Var GOOGLE_APPLICATION_CREDENTIALS and set a value to the location you want the file /app/google-credentials.json.

The compile step will generate a script /.profile.d/google-credentials.sh This script copies the contents of GOOGLE_CREDENTIALS into GOOGLE_APPLICATION_CREDENTIALS at startup.

About

Generates a Google credential file based on an environment variable

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%