• Home
  • Categories
  • Recent
  • Popular
  • Top
  • Tags
  • Users
  • Groups
  • Documentation
    • Home
    • Read API
    • Write API
    • Plugin Development
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
v3.5.2 Latest
Buy Hosting

Command to restart NodeBB with Bash

Scheduled Pinned Locked Moved Solved Technical Support
dockernodebb 1.0scriptconsolebash
8 Posts 2 Posters 4.5k Views
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    flex
    wrote on last edited by
    #1

    Hello

    Docker & launch script

    I have just built a launch script to automate the two commands with parameters of NodeBB and redis.
    I have configuration files on the host, linked to containers. In this way I can stop, delete and re-create NodeBB container and Redis container with data persistence !

    But there is just plugins who aren't persistent. So I install them on the launch script. In order to use them when I go on my forum, I need to restart or reload NodeBB.

    Someone can explain to me which command can I use on bash in my launch script ?

    Thank very much 🙂

    1 Reply Last reply
    0
  • qgp9Q Offline
    qgp9Q Offline
    qgp9
    wrote on last edited by qgp9
    #2

    Isn't ./nodebb restart enough?

    In that case, kill -HUP <nodebb precess id> may works for a restarting.

    But because you are using a docker, I guess that just restart of a container will be safe also. If you stop a container, docker sends SIGTERM to a main process and as I know that is exactly the signal to stop a nodeBB

    1 Reply Last reply
    1
  • F Offline
    F Offline
    flex
    wrote on last edited by
    #3

    ./nodebb restart

    Give to me :

    NodeBB could not be restarted, as a running instance could not be found.
    
    1 Reply Last reply
    0
  • qgp9Q Offline
    qgp9Q Offline
    qgp9
    wrote on last edited by qgp9
    #4

    @flex said:

    NodeBB could not be restarted, as a running instance could not be found.

    Yes, I got same with a dockerized nodeBB ( with both of npm start and ./nodebb start as a CMD )

    Just restart docker. A stoping of docker container is exactly same as ./nodeBB stop

    Of course you can use kill <process id> for stoping and kill -HUP <process id> for restarting

    1 Reply Last reply
    1
  • F Offline
    F Offline
    flex
    wrote on last edited by
    #5

    If you stop a container, docker sends SIGTERM to a main process and as I know that is exactly the signal to stop a nodeBB was the easier and best idea !

    Indeed, I just add docker restart forum-nodebb at the very end of my script, and now, it's works ! 🙂

    qgp9Q 1 Reply Last reply
    0
  • qgp9Q Offline
    qgp9Q Offline
    qgp9
    replied to flex on last edited by qgp9
    #6

    @flex Good to hear that.

    I think a reason why ./node restart doesn't work is that the restart command may work only in a demonized situation. I haven't tried to see details yet.

    Also if you are interested on my docker configuration, welcome to see and comments at https://github.com/qgp9/nodebb-docker-dev

    1 Reply Last reply
    1
  • F Offline
    F Offline
    flex
    wrote on last edited by
    #7

    @qgp9 said:

    if you are interested on my docker configuration

    I see that you use 3 docker container with one nginx. I use a nginx reverse proxy (in order to be able to use subdomains over the same IP address). Do you think that it's possible to don't use yours and replace it by my reverse proxy ?

    It's just a curiosity question, because now my configuration is working a least 🙂

    1 Reply Last reply
    0
  • qgp9Q Offline
    qgp9Q Offline
    qgp9
    wrote on last edited by
    #8

    @flex said:

    Do you think that it's possible to don't use yours and replace it by my reverse proxy ?

    HI, If you meant that one use a niginx which is installed on a host instead of a dockerized nginx which is dedicated for NodeBB, then it's totally possible, yes 🙂

    I just put some ideas and matters

    1. One can remove a dockerized nginx easily by just a modifying(removing) of nginx part from docker-compose.yml. Really, that's just it. ( This is a full chain, but if one doesn't need/want a full chain then.. 🙂 )
    2. One can use a dockerized nginx as a prime web server instead a host installed web server and can serve subomains or what ever with other docker or directory
    3. Actually this doesn't happen yet, but nginx can serve static files for NodeBB efficiently and you know, nginx is extremely small. So I'd rather proxy from a host installed nginx to the nodebb dedicated nginx docker ( In this case one needs to change a line 80:80 with 8080:80 or <any port>:80 in docker-compose.yml )

    But, if anybody wants to get an easier way and less steps, then your idea will be also a good option.

    1 Reply Last reply
    1

Copyright © 2023 NodeBB | Contributors
  • Login

  • Don't have an account? Register

  • Login or register to search.
Powered by NodeBB Contributors
  • First post
    Last post
0
  • Home
  • Categories
  • Recent
  • Popular
  • Top
  • Tags
  • Users
  • Groups
  • Documentation
    • Home
    • Read API
    • Write API
    • Plugin Development