<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[NodeBB Docker Update Script]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">I made it easier to Update NodeBB in Docker Container for peaople who Build themself.</p>
<p dir="auto">Nodebb has to be in Folder nodebb, otherwise it wont find the installation.</p>
<pre><code>#!/bin/bash

nodebb_path="/root"
nodebb_compose="docker-compose-orgi.yml"

plugins_ol="nodebb-plugin-embed \
nodebb-plugin-math-captcha \
nodebb-plugin-embed \
nodebb-plugin-emoji-android \
nodebb-plugin-google-analytics \
nodebb-plugin-sso-google \
nodebb-plugin-tenor-gif \
nodebb-plugin-sso-github"

if [ ! -f "$nodebb_compose" ]; then
   echo "Compose does not exist, aborting"
   exit 1
fi

if [ ! -d "$nodebb_path/nodebb" ]; then
   echo "Path not exist, aborting"
   exit 1
fi

# Backup current Data

if [ -d "$nodebb_path/nodebb-backup" ]; then
  echo "nodebb-backup exist"
  read -p "Delete old backup? (Y/N): " confirm
  if [[ $confirm == [Yy] ]]; then
  echo "Deleting backup"
  rm -rf $nodebb_path/nodebb-backup
else
  echo "Do not Update without current backup"
  exit 1
fi
fi

echo "Backup NodeBB Folder"
cp -r "$nodebb_path/nodebb/" "$nodebb_path/nodebb-backup"
echo "Backup NodeBB Image"
docker save nodebb-nodebb:latest | gzip &gt; "$nodebb_path/nodebb-backup/nodebb-nodebb_latest.tar.gz"

echo -e "\nFetch NodeBB Repository\n"
git fetch

echo -e "\nReset NodeBB Base\n"
git reset --hard origin/v4.x

echo -e "\nChange NodeBB User and Group\n"
chown -R 1001:1001 .docker public

echo -e "\nModify Dockerfile with Plugins\n"
if [[ $(grep -c "npm install" Dockerfile) -lt 2 ]]; then
sed -i "/EXPOSE 4567/a RUN npm install $plugins_ol" Dockerfile
fi
#echo "NPM Install count $(grep -c "npm install" Dockerfile)"

echo -e "\nBuilding NodeBB Image\n"
docker compose -f $nodebb_compose build

echo -e "\nDeploy NodeBB Image\n"
docker compose -f $nodebb_compose up -d

counter=0
while [ $(docker logs nodebb-nodebb-1 | grep -c "NodeBB is now listening") -lt 1 ]; do
   docker logs --tail 20 nodebb-nodebb-1
   sleep 10
   counter=$((counter+1))
   if [[ "$counter" -ge "30" ]]; then
      echo -e "\nNodeBB not Coming up, please investigate\n"
      exit 1
   fi
done

docker logs --tail 20 nodebb-nodebb-1

echo -e "\nChecking Plugins\n"

docker exec -i nodebb-nodebb-1  npm list | grep nodebb &gt; /tmp/nodebb-plugins.txt

for i in $plugins_ol; do
    if [[ $(grep -c $i /tmp/nodebb-plugins.txt) == 1 ]]; then
       echo "Plugin Installed $i"
    else
         echo "Plugin Not Installed $i"
    fi
done
</code></pre>
<p dir="auto">Greetings</p>
]]></description><link>https://forum.its-egner.de/topic/4589/nodebb-docker-update-script</link><generator>RSS for Node</generator><lastBuildDate>Tue, 11 Aug 2026 10:41:30 GMT</lastBuildDate><atom:link href="https://forum.its-egner.de/topic/4589.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 18 Dec 2025 09:36:43 GMT</pubDate><ttl>60</ttl></channel></rss>