Last active
May 17, 2017 16:04
-
-
Save mjquinlan2000/cc2165a301f5cd5fd51d0ef5fab300ec to your computer and use it in GitHub Desktop.
This is for maintaining a process started by an erlang process (such as phoenix applications built with distillery and/or delivered with edeliver)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=my_app | |
After=network.target | |
[Service] | |
User=ubuntu | |
Group=ubuntu | |
Restart=on-failure | |
Type=forking | |
Environment=HOME=/home/ubuntu | |
EnvironmentFile=/home/ubuntu/env_vars.env | |
ExecStart= /var/www/my_app/bin/my_app start | |
ExecStop= /var/www/my_app/bin/my_app stop | |
[Install] | |
WantedBy=multi-user.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo systemctl enable my_app | |
sudo systemctl start my_app | |
sudo systemctl status my_app |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment