how to run rebar3 release with "-config /path/my_sys.config"

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

how to run rebar3 release with "-config /path/my_sys.config"

Mark Geib-2
I just recently migrated an erlang project to use rebar3 from rebar. With the generated rebar release I was able to start the application with “/some_path/bin/my_app start -config “/some_other_path/my_app.config” which allowed for dynamic configuration. With rebar3 I don’t seem to have the same behavior, it always uses /some_path/releases/<version>/sys.config included during the release build.

Is there a way to something equivalent in rebar3.?

Thanks,

Mark.

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions

signature.asc (540 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: how to run rebar3 release with "-config /path/my_sys.config"

Mark Geib-2
After some more digging it looks like this works fine for starting the application in “console” or “foreground” mode, but not when I do a “start”.

Mark.

> On Oct 25, 2017, at 1:12 PM, Mark Geib <[hidden email]> wrote:
>
> I just recently migrated an erlang project to use rebar3 from rebar. With the generated rebar release I was able to start the application with “/some_path/bin/my_app start -config “/some_other_path/my_app.config” which allowed for dynamic configuration. With rebar3 I don’t seem to have the same behavior, it always uses /some_path/releases/<version>/sys.config included during the release build.
>
> Is there a way to something equivalent in rebar3.?
>
> Thanks,
>
> Mark.


_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions

signature.asc (540 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: how to run rebar3 release with "-config /path/my_sys.config"

Luke Bakken-2
In reply to this post by Mark Geib-2
I did some investigation into the runner script that ships with relx
and compared it to rebar's. The end result is this PR:

https://github.com/erlware/relx/pull/617

Thanks,
Luke

> After some more digging it looks like this works fine for starting the application in “console” or “foreground” mode, but not when I do a “start”.
>
> Mark.
>
> > On Oct 25, 2017, at 1:12 PM, Mark Geib <> wrote:
> >
> > I just recently migrated an erlang project to use rebar3 from rebar. With the generated rebar release I was able to start the application with “/some_path/bin/my_app start -config “/some_other_path/my_app.config” which allowed for dynamic configuration. With rebar3 I don’t seem to have the same behavior, it always uses /some_path/releases/<version>/sys.config included during the release build.
> >
> > Is there a way to something equivalent in rebar3.?
> >
> > Thanks,
> >
> > Mark.
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: how to run rebar3 release with "-config /path/my_sys.config"

Roger Lipscombe-2
There's also the RELX_CONFIG_PATH environment variable:
https://github.com/erlware/relx/commit/60dda02625d96c0473dcd03ecf1cea2c1600af18

On 26 October 2017 at 15:10, Luke Bakken <[hidden email]> wrote:

> I did some investigation into the runner script that ships with relx
> and compared it to rebar's. The end result is this PR:
>
> https://github.com/erlware/relx/pull/617
>
> Thanks,
> Luke
>
>> After some more digging it looks like this works fine for starting the application in “console” or “foreground” mode, but not when I do a “start”.
>>
>> Mark.
>>
>> > On Oct 25, 2017, at 1:12 PM, Mark Geib <> wrote:
>> >
>> > I just recently migrated an erlang project to use rebar3 from rebar. With the generated rebar release I was able to start the application with “/some_path/bin/my_app start -config “/some_other_path/my_app.config” which allowed for dynamic configuration. With rebar3 I don’t seem to have the same behavior, it always uses /some_path/releases/<version>/sys.config included during the release build.
>> >
>> > Is there a way to something equivalent in rebar3.?
>> >
>> > Thanks,
>> >
>> > Mark.
> _______________________________________________
> erlang-questions mailing list
> [hidden email]
> http://erlang.org/mailman/listinfo/erlang-questions
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: how to run rebar3 release with "-config /path/my_sys.config"

Dave Cottlehuber-5
In reply to this post by Luke Bakken-2
> > > I just recently migrated an erlang project to use rebar3 from rebar. With the generated rebar release I was able to start the application with “/some_path/bin/my_app start -config “/some_other_path/my_app.config” which allowed for dynamic configuration. With rebar3 I don’t seem to have the same behavior, it always uses /some_path/releases/<version>/sys.config included during the release build.
> > >
> > > Is there a way to something equivalent in rebar3.?

try putting it in ERL_AFLAGS instead?

env ERL_AFLAGS="-config /usr/local/etc/myapp/sys.config" ./bin/myapps
console

let me know if that works. A similar variant is in use here.

A+
Dave
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: how to run rebar3 release with "-config /path/my_sys.config"

Antoine Koener
From my own tests, and if I remind correctly, the extended script provided in the bin/ directory is, at first, look in the current directory for a sys.config file, then only in the release directory.

Have a look in the bin/<yourproject> script to see.

Hope that helps :-)

On Fri, Oct 27, 2017 at 12:01 AM, Dave Cottlehuber <[hidden email]> wrote:
> > > I just recently migrated an erlang project to use rebar3 from rebar. With the generated rebar release I was able to start the application with “/some_path/bin/my_app start -config “/some_other_path/my_app.config” which allowed for dynamic configuration. With rebar3 I don’t seem to have the same behavior, it always uses /some_path/releases/<version>/sys.config included during the release build.
> > >
> > > Is there a way to something equivalent in rebar3.?

try putting it in ERL_AFLAGS instead?

env ERL_AFLAGS="-config /usr/local/etc/myapp/sys.config" ./bin/myapps
console

let me know if that works. A similar variant is in use here.

A+
Dave
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions


_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions