Created
February 12, 2016 12:32
-
-
Save AmarPrabhu/a5ab6d91fbb8ee42fd17 to your computer and use it in GitHub Desktop.
ghost upstart service
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
#/etc/init/ghost.conf | |
description "Ghost Blog" | |
author "Your Name" | |
# Start the service after everything loaded | |
start on (local-filesystems and net-device-up IFACE=eth0) | |
stop on shutdown | |
# Automatically restart service | |
respawn | |
respawn limit 99 5 | |
script | |
# Navigate to your app directory | |
cd /var/www/ghost/ | |
# Run the script with Node.js and output to a log | |
su ghost -c "/usr/local/bin/npm start --production" 2>&1 >> /var/log/ghost.log | |
end script |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment