Hello,
I've been working on building NodeBB in a docker container, and I'm working with the latest branch.
When I initially launch the container (docker run -it ... nodebb_image
) I get the command line options to configure the container, which is fine (although I'd like to automate this if possible). The second time I launch the container however (docker start nodebb
, i.e. reuse the container) it does not detect that NodeBB has been set up and tries to run the command-line setup again. In order to finish launching the container, I have to docker attach nodebb
and kill the setup script. After that, NodeBB starts up as expected.
I've noticed in the Dockerfile contains this stanza: CMD node app --setup && npm start
which seems to me like it would run setup by default no matter what. Is that the expected behavior? It seems to me that Docker users would want to create a container that could be restarted any time without requiring any other interaction other than docker start <container>
.
I've also read the General-Purpose Dockerfile conversation (here: https://github.com/NodeBB/NodeBB/pull/3160) and tried to apply some of that.
Is there an environment variable that can be set to tell NodeBB that it has been set up previously and to skip the setup or otherwise have? Or is there a list somewhere of all the docker run -e
options that must/can be set up for a functioning instance?
Would pre-configuring NodeBB before building the docker container be a better and is this even an option?
Thanks,
Michael