@a_5mith That's it!
@psychobunny It was cache issues as usual, i should have learnt by now haha.
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
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
./nodebb restart
Give to me :
NodeBB could not be restarted, as a running instance could not be found.
@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
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 !
@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
@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
@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
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.