How do you include an erlang app in a release, but have rebar not start it?

StackOverflow https://stackoverflow.com/questions/14890699

  •  09-03-2022
  •  | 
  •  

Question

I'm using rebar to compile & generate a release.

Under my /apps folder, i have app1, app2. Currently the rel/reltool.config had app1, app2 configured. The console works as expected without errors.

I want only app1 to start on node startup, and manually start app2 via app1's supervisor.

Various Attempts at commenting/different values of incl_cond, etc have led to rebar generate errors like "must include app2 in release, cannot be excluded"

Suggestions appreciated. ~B

Était-ce utile?

La solution

You can either make app2 an included application of app1, by adding this to app1.app.src:

{included_applications, [app2]}

Or in your reltool.config, mark app2 as load-only, like this:

{rel, "myrelease", "1",
   [
     kernel,
     stdlib,
     sasl,
     app1,
     {app2, load}
   ]},
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top