Distillery: Run same service twice (easily)?

So, I’m using dynamic node names with distillery (adding a variable in my vm.args file and using REPLACE_OS_VARS=true on my command line).

It all works fine until I want to run a second instance of my service. Apparently starting the application overwrites the vm.args file in _build/dev/rel/<app>/var/vm.args, so it can’t be run twice from the same directory with different names as it overwrites the same file.

Even if it works at first (node 1 boots up with original values, node 2 boots up with overwritten values), shutting down the app cleanly doesn’t work because the “maint” node for this app will not work properly.

Now, if I expand the release into two separate directories, problem does not occur. But… Is there another solution? Or is it desirable to have separate dirs for each execution?

1 Like

In general, at least back in the Ol' Erlang Days, each running instance really needed its own release. :slight_smile: