How you running NodeBB ?
-
./nodebb start only. It's pretty stable
-
I just use ./nodebb start also. Never had a need to touch it otherwise.
-
[root@admin ~]# cat /etc/systemd/system/nodebb.service
[Unit]
Description=NodeBB Forum platform
After=system.slice multi-user.target[Service]
Type=simple
User=nodeStandardOutput=syslog
StandardError=syslog
SyslogIdentifier=node
SyslogFacility=local0WorkingDirectory=/home/node/forum/
ExecStart=/bin/node app.js
Restart=always[Install]
WantedBy=multi-user.target
[root@admin ~]#[root@admin ~]# uname -a
Linux localdomain 3.10.0-042stab112.15 #1 SMP Tue Oct 20 17:22:56 2015 x86_64 x86_64 x86_64 GNU/Linux
[root@admin ~]#
service nodebb start
service nodebb restart
systemctl enable nodebb.service
-
@agusputra I am trying to use pm2 as well.
But when I tried start nodebb in pm2
pm2 start loader.js --name nodebb
error will be in pm2 console
PM2: 2015-12-15 14:26:54: Starting execution sequence in -fork mode- for app name:nodebb id:2 PM2: 2015-12-15 14:26:54: App name:nodebb id:2 online PM2: 2015-12-15 14:26:55: App name:nodebb id:2 exited with code 0
Could you please tell me how to start nodebb in pm2?
-
@agusputra How do you stop NodeBB using your method?
If i do
pm2 stop MyForumApp
the pm2 list has a big red Stopped on it but I can still access the forum. If I then do./nodebb stop
it actually stops it. -
@giantkingsquid Yes, I do
./nodebb stop
-
Hmm intresting
-
Well it's /nodebb start or /nodebb stop to stop it
-
Stuck on windows (company VMs) so at first tried to setup NodeBB with NSSM.. Seemed to work fine until the forum crashed and then i ended up with multiple process running (repeat a few crashes and i had so many instances running that everything slowed down).. Now running with nodebb start from a batch file and everything is running great
-
My take on the systemd unit for the Debian Jessie platform. Requires a
nodebb
user set up and NodeBB installed to/var/nodebb
:[Unit] Description=NodeBB forum for Node.js. Documentation=http://nodebb.readthedocs.io/en/latest/ After=system.slice multi-user.target [Service] Type=simple User=nodebb StandardOutput=syslog StandardError=syslog SyslogIdentifier=nodebb Environment=NODE_ENV=production WorkingDirectory=/var/nodebb ExecStart=/usr/bin/node loader.js --no-daemon --no-silent Restart=always [Install] Alias=forum WantedBy=multi-user.target
Enable with
sudo systemctl enable nodebb.service
and start withsudo systemctl start nodebb.service
.
Thanks to @Apxukoc and @julian for the original unit and tips.