<div dir='auto'>I mean that relative path in sys.config should be relative to sys.config itself, not depending to another unstable value...<div dir="auto"><br></div><div dir="auto"><br><div dir="auto"><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">Le 17 févr. 2018 8:58 PM, Éric Pailleau <eric.pailleau@wanadoo.fr> a écrit :<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><div dir="auto">Hi,</div><div dir="auto">Yes, but using relative paths to another config file included, does not give same result depending if used in a release or start manually with -config. Path is from cwd (working directory) which is not the same in both case. </div><div dir="auto">Very annoying. </div><div dir="auto">Regards </div><div dir="auto"><br /></div><div dir="auto"><br /></div><div dir="auto"><br /></div></div><div><br /><div class="elided-text">Le 17 févr. 2018 7:49 PM, Tristan Sloughter <t@crashfast.com> a écrit :<br /><blockquote style="margin:0 0 0 0.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div>It is not a convention. Only with a file named sys.config will the runtime read in additional configs you may include within it by name. With sys.config you can do:<br /></div>
<div><br /></div>
<div>[{my_app, [...]},<br /></div>
<div> "other.config"}].<br /></div>
<div><br /></div>
<div>This will inclue the content of other.config, but only if the file this is in is sys.config.<br /></div>
<div><br /></div>
<div>Note that I have a PR to also make sys.config.src an option, <a href="https://github.com/erlang/otp/pull/1560">https://github.com/erlang/otp/pull/1560</a>. This improves the ability to template a config, like is done with RELX_REPLACE_OS_VARS. Currently your template has to be a valid Erlang term, so `{port, ${PORT}}` doesn't work, only `{port, "${PORT}}. </div>
<div><br /></div>
<div><div>--<br /></div>
<div> Tristan Sloughter<br /></div>
<div> "I am not a crackpot" - Abe Simpson<br /></div>
<div> t@crashfast.com<br /></div>
</div>
<div><br /></div>
<div><br /></div>
<div>On Tue, Feb 13, 2018, at 12:11 PM, Xavier Noria wrote:<br /></div>
<blockquote><div dir="ltr"><div>Some explanations of what's a release kind of assume there is a sys.config file to override application environment variables.<br /></div>
<div><br /></div>
<div>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).<br /></div>
<div><br /></div>
<div>So, is sys.config a special-cased file in releases like other expected directories or files? Or is it actually just a convention?<br /></div>
<div><br /></div>
<div>I noticed "Designing for Scalability with Erlang/OTP" does not mention sys.config when explaining releases. It only appears later on together with vm.args when talking about rebar3.<br /></div>
</div>
<div><u>_______________________________________________</u><br /></div>
<div>erlang-questions mailing list<br /></div>
<div><a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br /></div>
<div><a href="http://erlang.org/mailman/listinfo/erlang-questions">http://erlang.org/mailman/listinfo/erlang-questions</a><br /></div>
</blockquote><div><br /></div>
</div>
</blockquote></div><br /></div></blockquote></div><br></div>