Giter VIP home page Giter VIP logo

docker-nodebb's Introduction

nilsramsperger/nodebb

A simple Docker image for quick-launching a NodeBB forum.

Description

This repo contains the files for the automatic build of the Docker image nilsramsperger/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.

Tags

  • latest
  • v1.14.3
  • v1.14.2
  • v1.14.1
  • v1.13.3
  • v1.13.2
  • v1.13.1
  • v1.13.0
  • v1.12.2
  • v1.12.1
  • v1.12.0
  • v1.11.2
  • v1.11.1
  • v1.11.0
  • several older versions

Be advised, any other tags are for experimental purpose and might not be runnable. Best stick to latest or a specific version tag.

Setup

Create the container

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 nilsramsperger/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.

Start the container

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. Just leave the database settings as they are and click "Install NodeBB". When everything is done, click "Launch NodeBB". The container will restart and the browser switch to the forum.

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.

Volumes

  • /etc/nodebb contains NodeBB's config.json
  • /var/lib/redis contains the Redis data
  • /opt/nodebb/public/uploads contains NodeBB uploads like avatars

Backup and restore

Save the contents of the three volumes for creating a backup. To restore, copy the contents back.

Update to latest version

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.

Restarting

Since NodeBB is started via the app.js, restarting from admin panel is disabled. If you want to, just restart the container.

Support my work

You like this project and want to support my work? Feel free to spend a pint or two.

paypal

Troubleshooting

Problem

The NodeBB web-client notifies about broken web socket connections and tries to reestablish infinitely.

Solution

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".

Problem

The web installer tells the database connection cannot be established and/or the container is restarting infinitely.

Solution

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.

Problem

Something went wrong while updating to a newer version of NodeBB. Now the forum is broken.

Solution

  • Delete the container.
  • Restore the volumes, using the backups you created before updating.
  • Create a new container using the create command from the install section with a fixed image version.
    • Append the version number of the previously used image to the image name.
    • For example: nilsramsperger/nodebb:v1.13.0

docker-nodebb's People

Contributors

kelteseth avatar nilsramsperger avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.