I'm not sure how well it will work with digital ocean though. Works well with a dedicated server though!
Hi, My OS is CentOS 6.4 x64
I add this script to /etc/rc.d/rc.local to start NodeBB automatically after system reboot.
/etc/init.d/mongod start cd /var/nodebb /usr/local/node/bin/forever start /var/nodebb/app.js > /root/log /etc/init.d/nginx start
I find that mongodb and nginx can start successfully, but nodebb isn't running. The log file is empty. I don't know what the problem is. Could you help me?
but nodebb isn't running.
hmm...... it's probably erroring....
try this script instead:
/etc/init.d/mongod start cd /var/nodebb /usr/local/node/bin/forever start /var/nodebb/app.js &> /root/log /etc/init.d/nginx start
it won't fix your issue, but it should log both stderr and stdout to your log file for debugging
You'll probably want NodeBB to run in the foreground, and not pipe output to the log file, if you want to use
node loader.js --no-silent --no-daemon will run production mode and leave output piping to stdout. It will also run in the foreground, which forever expects.
If you use
app.js, you won't need
--no-daemon, but you'll only be running one process.