Manage application env from rebar3 profile

I Gusti Ngurah Oka Prinarjaya okaprinarjaya@REDACTED
Sat Nov 16 19:41:08 CET 2019


Yes it's possible.

You can utilise sys.config with configurations content like below:

    .... you can define more here as much as you want

Then, in order to be able shipping / bring sys.config into your release,
you need to treat sys.config as a dynamic configuration source file.

Follow steps below:
1. create a directory named config at root APP / project directory
2. create file sys.config inside config/ directory
3. the edit your rebar.config as below:

{shell, [
  {sys_config_src, "config/sys.config.src"},
  {apps, [APP_NAME]}

{relx, [
  {sys_config_src, "config/sys.config.src"},
    {APP_NAME, "0.1.0"},
  {dev_mode, true},
  {extended_start_script, true}

For further information you can read here:
and here: (more advance)

Hope it helps.

Pada tanggal Min, 17 Nov 2019 pukul 00.38 Nyirő Gergő <gergo.nyiro@REDACTED>

> Dear list,
> I would like to change some constant during testing e.g.: cycle time
> of a periodic job.
> It would be ideal to manage it from rebar3 config, but I don't see how
> should I edit
> the application env variables from rebar3 profiles. Is that even
> possible? Should I use
> persistent_term instead of application:get_env?
> Thanks for your help in advance,
> Gergő
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the erlang-questions mailing list