2017-05-27 18:09:50 +00:00
|
|
|
[unit]
|
|
|
|
Description=Node.js Sugarizer Server
|
2017-10-19 05:28:27 +00:00
|
|
|
# Requires=After=mongodb.service # Requires the mongodb service to run first
|
2017-05-27 18:09:50 +00:00
|
|
|
|
|
|
|
[Service]
|
|
|
|
WorkingDirectory={{ sugarizer_location }}/sugarizer/server/
|
|
|
|
ExecStart=/usr/bin/node sugarizer.js
|
|
|
|
Restart=always
|
2017-09-22 16:31:11 +00:00
|
|
|
#RestartSec=10 # Restart service after 10 seconds if node service crashes
|
2017-05-27 18:09:50 +00:00
|
|
|
StandardOutput=syslog # Output to syslog
|
|
|
|
StandardError=syslog # Output to syslog
|
|
|
|
SyslogIdentifier=sugarizer
|
|
|
|
#User=<alternate user>
|
|
|
|
#Group=<alternate group>
|
|
|
|
Environment=NODE_ENV=production
|
|
|
|
|
|
|
|
[Install]
|
|
|
|
WantedBy=multi-user.target
|