Closed sladg closed 1 year ago
Consider .env
file. In case .env
file is present during build, it will load on start from it. Basically, next build
propagates the file into output and we zip it then.
We should consider that .env
file is gonna propagate to the final build and into the code.
Next server's priority when resolving env vars (from top):
process.env
.env.$(NODE_ENV).local
.env.local (Not checked when NODE_ENV is test.)
.env.$(NODE_ENV)
.env
Support implemented by https://github.com/sladg/nextjs-lambda/commit/a85085d6968726dcea70def9ded4eb5f378d824a. Version ^3.13.0
I want to be able to pass environment variables during deployment, at the same time, I don't want to manage CDK myself as that's unnecessary overhead.
We need a convention on how to pass env vars to Lambda, without exposing all env vars as some of them might be private / unnecessary for app run.