[erlang-questions] Dealing with different environment configurations?

Roger Lipscombe roger@REDACTED
Fri Mar 21 17:30:58 CET 2014


On 21 March 2014 15:47, Motiejus Jakštys <desired.mta@REDACTED> wrote:
> sys.config can include other files: http://www.erlang.org/doc/man/config.html

The problem I had with that is that it expects either fully-qualified
paths, which means we need to know where the package is going to be
installed (I mean, we do, but it seems brittle). Or it looks for
config relative to the VM working directory. If you're using the relx
start script, that's one up from the 'bin' directory.

> We use 'priv/extra.config' for environment-specific configuration.

And do you keep that 'priv' directory next to the 'bin', 'lib',
'releases' directories, etc.? That might work. Do you then deploy a
separate file into that location on a per-environment basis.

> You might run into problems if you depend on these values from eunit,

I didn't think eunit (even with rebar) could use a config file.

> Motiejus

Thanks.



More information about the erlang-questions mailing list