When I'm testing my erlang application on localhost, I have a script that starts the server that looks like the following:
#!/bin/sh
PWD="$(pwd)"
NAME="$(basename $PWD)"
erl -pa "$PWD/ebin" deps/*/ebin -boot start_sasl \
-name [email protected] \
-s reloader \
-s $NAME \
-setcookie some_random_cookie \
+K true \
+P 65536
This prompts open the Erlang shell and from there I would type something like:
application:start(myapp)
This is fine for development purposes, but how do I deploy this in production? As of right now, the only way I can think of doing this is by starting a screen process and detaching from it. I don't think that should be the case. I am using rebar, if that helps at all.