Set up NodeBB via environment variables
-
@Nicolas If everything is the same, you shouldn't even have to run
./nodebb setup
, you should be able to just start it. -
Still no because you will not have necessary node packages - for example mongo_db
Also from scratch, there is probability that you don't have populated database, as a result you need dummy data from setup script - like categories, admin user, etc. -
@Nicolas Seems like we need a better CLI. Maybe a Node-based one possibly called NBBVM?
adds to long list of plugins/utilities to build
-
Thanks for the comments guys
The automated setup via environment variables is to aid with setup on cloud services and our SaaS platform. The interactive prompt will still continue to be in use, but we're looking to change the default installation steps to utilise the web installation interface Andrew has implemented.
From there, we can reduce the steps to:
- Install dependencies
- Clone the repository
npm install --production
- Start the web install (via
npm start
possibly)
A cloud hosting provider can automate all four steps, so nobody has to mess with a shell again
-
@julian Objection! When setting settings through env variables, they are always strings. Currently NodeBB doesn't seem to take this into account. i.e. running
./nodebb start
(ornpm start
) with the env variablesdaemon
andsilent
both set tofalse
, NodeBB still starts both daemonized and silent.
(false
does not equal"false"
)Also, slightly unrelated, but when doing the setup thingy with a redis password provided, i.e. like
$ database=redis redis__password=CorrectHorseBatteryStaple node app --setup`
the password provided is used during the install but not actually saved to config.json.
-
Maybe you should add that to the docs was really hared for me to find out it was possible and it is really interesting if setting it up with docker-compose. You guys might just add it to the docker read me page. https://hub.docker.com/r/nodebb/docker/