I need that the release have --name instead of --sname and need to pass some other env vars specific to that release.
For instance
mix release node1 => iex --name node1@127.0.0.1 --erl "-project port 5555 -project nodes []" -S mix
mix release node2 => iex --name node2@127.0.0.1 --erl "-project port 5556 -project nodes [node1]" -S mix
How can I achieve this behaviour?
When you initiated the release support with mix release.init, it had created three files in rel folder.
vm.args.eex is a template for erlang params, its skeleton is self-explanatory.
hauleth
3
Alternatively ERL_OPTS envoronment variable can be used.
jozuas
4
As a future reference for whoever is reading - the environment variable is called ERL_FLAGS, not ERL_OPTS. See erl — OTP 29.0.2 (erts 17.0.2)