I'm trying to deploy an API do AWS EC2.
And this API has environment variables inside application.properties, such as $DB_HOST, $DB_USER and $DB_PASS, and then I set them at
vim .bashrc
source .bashrc
All the process occurs alright for the deployment, but when I run
sudo mvn package
It doesn't recognize the environment variables setted from the OS (linux) and build fail. I can't really find any similar solution here.
Also tried putting them inside the /˜profile with
nano /˜profile
source /˜profile
Anyone has any ideas? :)