My team developed a package for this @invisible/deploy. But we’re off Google App Engine for now. Too many problems with it.
Don’t put your secret information in your code
How to solve this dilemma?
Store secrets in Google Cloud Storage
Google Cloud ->
Create a Bucket. The name should include:
- your project name
- your domain (optional)
Let’s say I create a project named “blog”, to host my blog. I would name it
Bucket names are unique across Google Cloud (not just Company or Project wide). Names ending with a domain are reserved. But you have to go through the trouble of verifying ownership.
Upload to this bucket your
.env file. Example:
Importing Bucket content into process.env
prestart hook to
Add script to download
dotenv to load content into
Making it work locally (development environment)
It works out of the box if you have a
.env file in your local environment.