This is a fork of nilsramsperger/nodebb to provide a current release of NodeBB.
145
A simple Docker image for quick-launching a NodeBB forum.
This repo contains the files for the automatic build of the Docker image darkalchemy/nodebb hosted on DockerHub.
The NodeBB comes with no plugins and the forum data is stored in a Redis within the container. The Redis is configured for AOF persistence. Not the fastest but the least chance for data loss on unexpected shutdowns.
New releases of the NodeBB image come with a corresponding tag in the repo. You can subscribe the (atom feed)[https://gitlab.com/darkalchemy/docker-nodebb/-/tags?feed_token=xq6bnSGnxi7b9vUHsjzs&format=atom] to be notified about updates.
Currently NodeBB has two active branches for v2 and v1.
The image tagged as latest is equal to the latest version of the v2 branch.
With the arrival of the v2 branch, the NodeBB team updated it's release policy. Updates come with a much more high frequency now. I cannot guarantee that every release will find it's way into a new build of the image. But I will build an up to date image asap.
latestv2.5.7v2.4.4v2.4.1v2.4.0v2.3.1v2.2.5v2.2.4v2.2.3v2.2.0v2.1.1v2.1.0v2.0.1v2.0.0v1.19.8v1.19.7v1.19.6v1.19.5v1.19.4v1.19.2v1.19.1v1.19.0Be advised, any other tags are for experimental purpose and might not be runnable.
Best stick to latest or a specific version tag.
docker create --name myNodeBB --init --restart always -p 4567:4567 -v nodebb-data:/var/lib/redis -v nodebb-files:/opt/nodebb/public/uploads -v nodebb-config:/etc/nodebb darkalchemy/nodebb
In this case the container named myNodeBB and is bound to local port 4567.
The three volumes are linked to the named volumes nodebb-data, nodebb-files and nodebb-config.
Change things as you like.
docker start myNodeBB
On first run, NodeBB will start it's web installer interface. There you can create your admin account and set things up. Switch the database to Redis and click "Install NodeBB". When everything is done, click "Launch NodeBB". The container will restart and the browser switch to the forum.
I am not sure, if an upgrade from 1.19.x to 2.x.x works well in terms of the DB schema upgrade. So be sure to backup your volumes in case anything goes awry.
The Web Installer of 1.19.4 leaks the admin password to the log! Be sure to change it right after a fresh installation.
If an image of version 1.5.x or less is used, the container will not restart on "Launch NodeBB". The restart must be done manually.
If your NodeBB forum is accessible via a public URL, it needs to be told about that.
Otherwise some features might break.
WebSockets for example.
Tell NodeBB about it's public URL by setting the url environment variable on container creation.
Example: -e url=https://www.myforum.com:8080
Per default, the container uses UTC as timezone.
If you want to specify a different timezone, add timezone as ENV on container creation.
Example: -e timezone=Europe/Brussels
/etc/nodebb contains NodeBB's config.json/var/lib/redis contains the Redis data/opt/nodebb/public/uploads contains NodeBB uploads like avatarsSave the contents of the three volumes for creating a backup. To restore, copy the contents back.
If you want to update your NodeBB to the latest version, make backups of the volumes first.
After that just stop and remove your current container.
Then recreate it with the create command from the install section.
On startup, the container will run a nodebb upgrade and thus prepare the database for the new version of NodeBB.
Since NodeBB is started via the app.js, restarting from admin panel is disabled.
If you want to, just restart the container.
The NodeBB web-client notifies about broken web socket connections and tries to reestablish infinitely.
The public URL and port in the config.json are not set correctly.
When creating the container, you can set the public URL via -e url="http://127.0.0.1:4567".
The web installer tells the database connection cannot be established and/or the container is restarting infinitely.
May be you are using preexisting named volumes or host volumes. If so, make sure redis can access them. Anyway, fresh named volumes is the preferred way.
Something went wrong while updating to a newer version of NodeBB. Now the forum is broken.
create command from the install section with a fixed image version.
darkalchemy/nodebb:v1.13.0NodeBB shows an "invalid-event" error after performing updates and installation of the quill editor plugin. An example is documented here:
It is not quite sure, what actually caused the problem. The following actions solved the issue:
Content type
Image
Digest
sha256:cac055c09…
Size
262.3 MB
Last updated
almost 4 years ago
docker pull darkalchemy/nodebb