[erlang-questions] is sys.config mostly a convention?

Loïc Hoguin essen@REDACTED
Tue Feb 13 21:16:31 CET 2018


On 02/13/2018 09:11 PM, Xavier Noria wrote:
> Some explanations of what's a release kind of assume there is a 
> sys.config file to override application environment variables.
> 
> I don't quite find source code in Erlang/OTP that specifically looks for 
> that file. What I see, instead, is that the scripts generated by build 
> tools pass -config sys.config to erl(1) if the file exists. Then, the 
> application controller merges whatever goes in -config (though some 
> comments in the source code do mention sys.config).
> 
> So, is sys.config a special-cased file in releases like other expected 
> directories or files? Or is it actually just a convention?

It does not sound like it's only a convention based on this part of the 
documentation: http://erlang.org/doc/man/config.html

For example: "When installing a new release version, the new sys.config 
is read and used to update the application configurations."

I do not know if that is truly representative of what the code is doing, 
though.

Cheers,

-- 
Loïc Hoguin
https://ninenines.eu



More information about the erlang-questions mailing list