Hi Sorry I accidentally sent my unfinished question here is the edit,
I found this example of using systemd to deploy Phoenix. My quesiton is where do I put restart=‘always’ inside this,
Description=Runner for My Phoenix App
Please let me know if something is wrong with this example. Thanks.
Could you share that example? You should use
[Service] section. You can check out my quite complex example that uses other fancy systemd features.
please let me know if there is something wrong with my example.
Assuming that you are using
mix release, not Distillery then
RemainAfterExit is incorrect as you do not fork into background (in general if you can, you should NOT daemonize in systemd services). I would use
Require in addition to
After. You can also check my example linked above together with
systemd library for better integration (notification socket, watchdog, and journal integration).