Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 04 May 2022 23:48:48 -0700
From:      "Pat Maddox" <pat@patmaddox.com>
To:        "Dave Cottlehuber" <dch@skunkwerks.at>
Cc:        erlang <freebsd-erlang@FreeBSD.org>
Subject:   Re: package mix release works, port doesn't? (and neither is self-contained)
Message-ID:  <9B6718AD-FC61-4DBC-8DF1-9FF0E207B945@patmaddox.com>
In-Reply-To: <d2915f8a-2280-4c23-a251-645f1efd0185@www.fastmail.com>
References:  <42EA9771-2440-49D3-BEFA-05A888F8D90A@patmaddox.com> <A20A5B06-676E-4AF8-940A-3992194B1E80@patmaddox.com> <d2915f8a-2280-4c23-a251-645f1efd0185@www.fastmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 4 May 2022, at 7:16, Dave Cottlehuber wrote:

> On Wed, 4 May 2022, at 11:16, Pat Maddox wrote:

>> I still don’t understand why I need an erlang runtime at all 
>> though,
>> after the mix release has been built.
>>
>> Pat
>
> you don't; whether erts is bundled in the release is defined in your
> mix release config. I'm assuming your ExAmple app picks up whatever
> the default is, see the hello app for an appropriate example.
>
> https://hexdocs.pm/mix/Mix.Tasks.Release.html
> &
> https://github.com/skunkwerks/hello/blob/master/rel/config.exs#L33
>
> I've tried both approaches in the past, and now I always bundle
> erts within the application.
>
> You do need to run the epmd daemon somewhere, this is easily
> enough done via including lang/erlang as a package dependency,
> or via your CI/CD deployment tools, and starting the epmd service
> that is provided on FreeBSD.

hrm...

according to the mix release docs 
(https://hexdocs.pm/mix/Mix.Tasks.Release.html):

“If mix release is invoked and there are no names, a release using the 
application name and default values is assembled.”

“Releases do not even require Erlang or Elixir in your servers, as it 
includes the Erlang VM and its runtime by default.”

“:include_erts ... The default is true, which is also the recommended 
value”

My point is that I don’t think I should have to install lang/erlang to 
run the mix release - that’s part of the point of mix release, is to 
provide everything needed to run the app, no additional runtimes 
required.

It’s also different behavior than I see on ubuntu, where we mix 
release, copy the dir to a fresh image (no elixir or erlang) and it runs 
fine.

I’m definitely missing something here.

Pat



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9B6718AD-FC61-4DBC-8DF1-9FF0E207B945>