How to set secret files path?

I have a project using this boilerplate

There are 2 .env files, one in root dir (Hardhat) and the other in frontend dir (Nextjs app). I deployed the frontend, but the environment variables are undefined since Render .env secret file is only available in root dir. Is it possible to add a .env secret file in the frontend dir?

Hi Peter,

Unfortunately, right now there is no way to specify the absolute path of your .env files. All secret files you create are available to read at the root of your repo (or Docker context). They are also available to load by absolute path at /etc/secrets/ so you should still be able to reference them from your application regardless of the directory the application is located.

1 Like