How can I run a phoenix server in background of my droplet ( or just say the os).
I am looking for some process manager like pm2 is there for nodejs.
The best-practice way of doing this is definitely to generate an Erlang release using something like https://github.com/bitwalker/distillery. A release will package everything up into a nice tarball so that you don’t have to have Mix and all that installed on your droplet. Then, running your release in the background is easy! Once you have the release unpacked, just run
bin/<name> start to run your app in the background as a daemon! To stop it just do
You can check out the walkthrough here: https://hexdocs.pm/distillery/walkthrough.html.
mix phx.serverin tmux
mix phx.serverwith systemd
- build release and run it with systemd
- build docker image and run it with systemd
- build docker image and run it k8s
Also build docker image and run it with Docker Compose