DEV Community

Discussion on: Please don't commit .env

Collapse
 
ajinkyax profile image
Ajinkya Borade

I need the .env file during build on CI how do I make sure GCP receives my .env file if I have not committed it on github ?

  1. I can use Github /settings/secrets
  2. I can pass them to .env file
  3. But how do I read the (/settings/secrets) same in local setup ?
Collapse
 
somedood profile image
Basti Ortiz

To be honest, I am not exactly versed in the Google Cloud Platform. However, I do know they provide a (paid) Secrets Manager service that does exactly what you need in a secure manner. Otherwise, there doesn't seem to be a "free" workaround.

But that doesn't mean other cloud platforms have this limitation. Heroku, for example, allows you to directly set environment variables in the app itself.

So at the moment, I can't offer you any solutions with GCP. I'm unfortunately not familiar with it.

Collapse
 
ajinkyax profile image
Ajinkya Borade

cool. thanks