Hello and thank you in advance for your help.
I am running a Digital Ocean Droplet with Ubuntu Server 20.04. I have Virtualmin, Webmin and the package for that setup. I have the same setup for a dev platform that I test before making update live on the production server. I am also using pm2 to run my node applications with a proxy website under the domain in virtualmin pointing to http://127.0.0.1:PORT.
I am having trouble on where to put environment variables.
I have tried this location and the variables just don’t work. In my node app I am using process.env.VARIABLE.
I have also put variables in /etc/environment and have created a sh file with the variables in /etc/profile.d folder.
I am not sure what I am doing wrong or if I need to be adding these variables in a totally different spot. I have done hours of research on the internet. The current solution that I have somewhat working is putting the variables in both /etc/environment and /etc/profile.d/myvariables.sh.
In /etc/environment I am using the following format:
In the myvariables.sh I am using the format below:
I am lost and need some help getting back on the path and the proper way to make this work. Let me know if you need any other info and thanks again for the help.