I have tried to set my environment variables multiple ways on my Ubuntu server but nothing seems to work. I need to know how to properly set them on the digital ocean droplet I am using to host my website.
I have tried the following:
- By using a file called screts.sh and putting all of the variable exports in there on different lines:
export ENVIRONMENT_VARIABLE=TheValue
and then usingsource screts.sh
in the terminal. - By simply entering
export ENVIRONMENT_VARIABLE=TheValue
in the Ubuntu terminal as the user for my application (not as root) - I've also tried to use
set ENVIRONMENT_VARIABLE=TheValue
but that doesn't work either.
After echoing the variable for the last 2, it gave me back the correct value. I did it by typing this in the terminal: echo $VARIABLE_NAME
Thanks for any help!