How to handle .envs files

Hi devs!

Coming from the world of nodejs platforms we rely on .env files for environment variables.

I am building a nethserver module and would like my container to have access to the env variables . Some are sensitive secrets.

What’s the recommend workflow ?

In the case an enc file has lot of entries, how would we efficiently handle this in nethserver 8 setup ?

hello @leemlwando welcome to the community

As you can see in the file above we pass all the env vars into the object to create the .env

After the .env is created we can pass to the service using

--env-file=zitadel-app.env

if you want to pass only one env var

--env VITE_APP=Test \

Full examples
For file based envs

For inline ENVS

4 Likes

If you have any question feel free to ask

1 Like