-
-
Save lucagervasi/dcdf0143884718a2b4b5f44ade622f74 to your computer and use it in GitHub Desktop.
This file contains hidden or 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=Nodejs Web Application MyAPP | |
After=syslog.target network.target | |
[Service] | |
TimeoutStartSec=300 | |
WorkingDirectory=/opt/nodejs/MyAPP/app | |
User=nodejs | |
Group=nodejs | |
Environment=PATH=/home/nodejs/.nvm/versions/node/v8.11.1/bin:/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin | |
Environment=PM2_HOME=/home/nodejs/.pm2 | |
EnvironmentFile=/etc/sysconfig/nodejs-MyAPP | |
ExecStart=/home/nodejs/.nvm/versions/node/v8.11.1/lib/node_modules/pm2/bin/pm2 start ecosystem.config.js --env production --update-env --no-daemon | |
ExecStop=/home/nodejs/.nvm/versions/node/v8.11.1/lib/node_modules/pm2/bin/pm2 delete ecosystem.config.js | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment