Deploying program on erlang runtime 21

Joe Love joe at getsomewhere.net
Wed May 29 20:25:51 UTC 2019


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.

I think I’m a bit lost somewhere on it, and am hoping to get some guidance here.


I’ve created my project on my mac.  I’ve added Distillery (per many suggestions & guides).  If I understand everything correctly, I can’t include ERTS, as that’s the part which is compiled based on the host OS.  Therefore, I modified my Distillery config to not include ERTS in the production build, and then ran `mix release --env=prod`.

I uploaded the resulting _build/dev/rel/myproject to the FreeBSD server which has erlang-runtime-21 on it.
I set my path to include /usr/local/lib/erlang21/bin, added ERTS_LIB_DIR = /usr/local/lib/erlang21/erts-10.3 and tried to run it.  Apparently I have erts-10.1 on my machine and the server had erts-10.3, so it seems that that also needs to match.

So, given all of this, I remember being told that while the lang/erlang port was older, that I could always use the runtime ports, and things would work.  Can someone fill me in on how they're supposed to work?  It seems like things are more intricate regarding running beam-vm-based programs on a different machine than that you’re building it on.

Thanks,
-Joe


More information about the freebsd-erlang mailing list