Deploying program on erlang runtime 21

Dave Cottlehuber dch at skunkwerks.at
Thu May 30 23:13:08 UTC 2019


> On 30/05/2019 20:48, Joe Love wrote:
> >> On May 30, 2019, at 7:50 AM, Dave Cottlehuber <dch at skunkwerks.at> wrote:
> >>
> >> On Wed, 29 May 2019, at 20:31, Joe Love wrote:
> >>> Hi,
> >>>
> >>> I’ve been trying to wrap my head around creating my Elixir-based
> >>> projects on my client workstations (which are not freebsd) and
> >>> deploying them to a FreeBSD server using the erlang-runtime-21 package.

Hi Joe

https://github.com/skunkwerks/hello/ contains about 80% of a blog post in the
README, it's a minimal phoenix project with the build goop to produce a native
FreeBSD package. This, and pkg-repo behind a webserver allows you to
deploy only with pkg.

I stripped out all the (IMO) messy bash scripts, and the rc.d script does the
minimum needed. I assume in most cases you'll want to use distributed
erlang and you either pass that in with erl_flags or in vm.args as appropriate.

It's possible to add extra stuff in the manifest to start or stop your app
directly, but I prefer to do that via ansible.
 
Let me know if anything's not clear. I hope it's useful for you, and PRs are
welcome for any improvements.

A+
Dave


More information about the freebsd-erlang mailing list