<div dir="ltr">Hi,<div><br></div><div>>> Should I use persistent_term instead of application:get_env?</div><div>Use <font face="monospace">application:get_env(YOUR_APP_NAME, your_env_var1_defined_in_os_in_lowercase)</font></div><div><br></div><div>No need to use persistent_term , that's a different thing and not related to consuming-os-env-vars task. Because I assume your needs is consuming OS ENV vars.</div><div><br></div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Pada tanggal Min, 17 Nov 2019 pukul 01.41 I Gusti Ngurah Oka Prinarjaya <<a href="mailto:okaprinarjaya@gmail.com">okaprinarjaya@gmail.com</a>> menulis:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi,<div><br></div><div>Yes it's possible. </div><div><br></div><div>You can utilise <font face="monospace">sys.config</font> with configurations content like below:<br><br>[<br><font face="monospace"> {YOUR_APP_NAME, [</font></div><div><font face="monospace"> {your_env_var1_defined_in_os_in_lowercase, "${YOUR_ENV_VAR1_DEFINED_IN_OS}"},<br> {your_env_var2_defined_in_os_in_lowercase, "${YOUR_ENV_VAR2_DEFINED_IN_OS}"},</font></div><div><font face="monospace"> {your_env_var3_defined_in_os_in_lowercase, "${YOUR_ENV_VAR3_DEFINED_IN_OS}"},<br></font></div><div><font face="monospace"> .... you can define more here as much as you want</font></div><div><font face="monospace"> ]}<br>].</font><br><br>Then, in order to be able shipping / bring <font face="monospace">sys.config</font> into your release, you need to treat sys.config as a dynamic configuration source file. </div><div><br></div><div>Follow steps below:<br>1. create a directory named config at root APP / project directory</div><div>2. create file sys.config inside config/ directory</div><div>3. the edit your rebar.config as below:</div><div><br></div><div><font face="monospace">{shell, [<br> {sys_config_src, "config/sys.config.src"},<br> {apps, [APP_NAME]}<br>]}.<br><br>{relx, [<br> {sys_config_src, "config/sys.config.src"},<br> {<br> release,<br> {APP_NAME, "0.1.0"},<br> },<br> {dev_mode, true},<br> {extended_start_script, true}<br>]}.</font><br><br>For further information you can read here: <a href="http://www.rebar3.org/docs/releases#section-dynamic-configuration" target="_blank">http://www.rebar3.org/docs/releases#section-dynamic-configuration</a></div><div>and here: <a href="http://www.rebar3.org/docs/dynamic-configuration" target="_blank">http://www.rebar3.org/docs/dynamic-configuration</a> (more advance)</div><div><br></div><div>Hope it helps.</div><div><br></div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Pada tanggal Min, 17 Nov 2019 pukul 00.38 Nyirő Gergő <<a href="mailto:gergo.nyiro@gmail.com" target="_blank">gergo.nyiro@gmail.com</a>> menulis:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Dear list,<br>
<br>
I would like to change some constant during testing e.g.: cycle time<br>
of a periodic job.<br>
It would be ideal to manage it from rebar3 config, but I don't see how<br>
should I edit<br>
the application env variables from rebar3 profiles. Is that even<br>
possible? Should I use<br>
persistent_term instead of application:get_env?<br>
<br>
Thanks for your help in advance,<br>
Gergő<br>
</blockquote></div>
</blockquote></div>