I built my program with mix release
and started the app with _build/dev/rel/myapp/bin/myapp daemon
…works great. Before doing my restart I edited my .env
file with the new value for my key sample
. My releases config is:
import Config
config :myapp,
sample: System.fetch_env!("SAMPLE")
If I run echo $SAMPLE
I get my value of “HELLO”. Likewise, if I run Application.fetch_env!(:myapp, :sample)
I get that, as well as System.fetch_env!("SAMPLE")
I then edit the .env
file and change SAMPLE
to “WORLD”, then source .env
and verify that the change is correct and then restart the app with
_build/dev/rel/myapp/bin/myapp restart
…this does not recognize the environment variable change. Not unless I do a full stop and start the daemon again