Skip to content

Instantly share code, notes, and snippets.

@himalay
Created June 28, 2018 11:13
Show Gist options
  • Save himalay/699f26f8f897e0e2ded7a452cc948ecc to your computer and use it in GitHub Desktop.
Save himalay/699f26f8f897e0e2ded7a452cc948ecc to your computer and use it in GitHub Desktop.
systemd service config file Install to /etc/systemd/system/mynodejsapp.service
systemd service config file
Install to /etc/systemd/system/mynodejsapp.service
[Unit]
Description=My node.js App
[Service]
User=mynodejsapp
Group=mynodejsapp
WorkingDirectory=/opt/mynodejsapp
EnvironmentFile=/etc/mynodejsapp/config
Environment=NODE_ENV=production
ExecStart=/usr/bin/node cluster.js
Restart=always
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment