jpcaruana

jpcaruana

Hello,

I am a bit confused with the release process with mix.
I want to deploy my release on a server with erlang installed, but when I run MIX_ENV=prod mix release I don’t know what files I should take, how to send it to my server. I love that it comes with all batteries included (start, stop, daemon etc..) but it seems to also package erlang with it. I don’t need to package erlang with it.

I build on a Mac system but I want to run it on a Linux one.

My dream is a zip/tgz file that I can unzip on my server, run a start command and just works with my installed erlang unix binary, since beam files do not depend on the undelying system.

Any idea ?

Showing Posts 1 to 6

jpcaruana

jpcaruana OP

I also have elixir on my server but running beam files should not need elixir to be present

pmangalakader

pmangalakader

Have you checked out this one:

:include_erts - a boolean, string, or anonymous function of arity zero. If a boolean, it indicates whether the Erlang Runtime System (ERTS), which includes the Erlang VM, should be included in the release. The default is true , which is also the recommended value. If a string, it represents the path to an existing ERTS installation. If an anonymous function of arity zero, it’s a function that returns any of the above (boolean or string).

The official documentation is here

jpcaruana

jpcaruana OP

Thanks for your input.

I tried to point it to an ERTS installation with the target unix path (different from mine on mac) and I got an error:

** (Mix) Could not find ERTS system at "/usr/bin/erl"

Okay, I’ll let the magic of the PATH happen : use false instead.

When I run start on my server (I scp-ed the whole prod dir to my server) I have a crash dump:

$ rel/xxx/bin/xxx start
{"init terminating in do_boot",{load_failed,[code_server,logger_server,logger_backend,logger_filters,logger,kernel,heart,gen_server,gen_event,gen,file_io_server,file,file_server,filename,erl_eval,ets,error_logger,erl_parse,erl_lint,code,application_master,application_controller,application,error_handler,supervisor,proc_lib,lists,logger_config,logger_simple_h]}}
init terminating in do_boot ({load_failed,[code_server,logger_server,logger_backend,logger_filters,logger,kernel,heart,gen_server,gen_event,gen,file_io_server,file,file_server,filename,erl_eval,ets,er

Crash dump is being written to: erl_crash.dump...done

I am more and more puzzled

jpcaruana

jpcaruana OP

sadly the documentation says I have to compile on my target:

Currently, there is no official way to cross-compile a release from one target triple to another, due to the complexities involved in the process.
pmangalakader

pmangalakader

Glad, you found it!

Oliver

Oliver

Is there an actual solution for this?

I have built elixir for Intel/Linux on an Intel/Linux machine, and I try to run it with the flag set to false in release on another slightly different machine, but I get those loading errors as well.

Is there any way around this?

— All posts loaded —

Where Next? Top

Trending in Questions Top

RSP87
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
New
nseaSeb
Hello, I know there is an approach for handling lists that allows for optimized traversal, but I can’t recall the specific method (somet...
New
kpanic
Hi everyone, I am toying with the idea of building a “match maker” for giving personal help to people that wants to start coding. I sta...
New
brecabral
Documentation While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
New
velrest
So my question is quite simple and i have found no conclusive answer on forum, google or AI. Should we use :erlang.float for Integer to ...
New
asweet-confluent
I recently noticed that Elixir’s Logger defaults its primary log level to :debug when no :logger, :level application configuration is pre...
New
ryanwinchester
apply_graft/2 doesn’t rewrite an add_many sub-workflow’s deps on an add step. Grafted jobs cancel with “upstream job was deleted” Version...
New

Other Trending Topics Top

JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
marciok
Hi there! We created Gust: A task orchestrator inspired by Airflow. For those who have never heard about Aiflow, it’s a Python-based wor...
New
mhanberg
Hi everyone! The first release candidate for the Expert language server project is now available! We’ve published a press release detai...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Dmk
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews