Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

Hi there,
I’m trying to properly setup “GOOGLE_APPLICATION_CREDENTIALS” (https://cloud.google.com/docs/authentication/getting-started) in my droplet. I’ve currently added the GOOGLE_APPLICATION_CREDENTIALS as an environment variable. Its value is the content of the json key file (containing credentials to verify usage of a Google Service), which is required to start the application.
On startup this environment variable is recognized, but Google needs the value to be an actual json file instead. A simple solution would be to add the key file to my repo and link the environment variable to that file. This is however unsafe.
Is there a way to generate a json file on startup, which contains the value I put in the environment variable? This is a solution which appears to work in Heroku (https://github.com/elishaterada/heroku-google-application-credentials-buildpack/issues/2#issuecomment-580212700), but I haven’t found something similar in Digital Ocean.
Of course any solution is welcome, as long as I don’t have to commit my json file to a repo.
Thanks!
a6309a057c3f4cb38fb2e7feb67236
KFSys
Thomas M
ef1ed44cc2154be3bcbb2d727878f8
Devs Neonetworks
1e6b823ea20d4cb189a34a922f5588
Telmo Valverde
erik-jan martens
Henry Mui
anthonycarreon
garantieheld
Marin