Das is der Freddenator 

Hi,
I made it easier to Update NodeBB in Docker Container for peaople who Build themself.
Nodebb has to be in Folder nodebb, otherwise it wont find the installation.
#!/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 > "$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 > /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
Greetings
If you have Nginx reverse Proxy you need to Forward requests to subfolder cacti
location = / {
return 301 /cacti;
}
Greetings
For help visit me at http://forum.its-egner.de
At first clone Repo and change Directory
git clone https://github.com/Its-egner/Cacti.git
cd Cacti
Edit docker-compose File, change Passwords! and bring Container up.
docker compose up -d
Container will build and start
Chown the Files to
chown 33:33 cacti_log/ cacti_plugins/ cacti_rra/
Do Database initialisation with
docker exec -ti cacti_app bash /var/www/html/init-db.sh
visit cacti <your_IP>:7070/cacti
If prompt for Login use admin admin
If you want to use Spine, enter config Path
/usr/local/spine/etc/spine.conf
Hi everyone,
I start building my own cacti Container from scratch, because there is no good one out there, wich is easy upgradable.

leckeres Japan. Curry und hausgemachte Limonade
Mannheim Innenstadt
Hi,
first we need the check in nodebb/.docker/config
vi healtcheck.js
const http = require('http');
const options = {
host: '127.0.0.1',
port: 4567,
timeout: 2000
};
const healthCheck = http.request(options, (res) => {
console.log(`HEALTHCHECK STATUS: ${res.statusCode}`);
if (res.statusCode == 200) {
process.exit(0);
}
else {
process.exit(1);
}
});
healthCheck.on('error', function (err) {
console.error('ERROR');
process.exit(1);
});
healthCheck.end();
Then we can add the check in our yml File
healthcheck:
test: ["CMD", "node", "/opt/config/healthcheck.js"]
interval: 5s
timeout: 3s
retries: 5
start_period: 15s
To check if everything is Working we can watch docker ps, it should be healthy there or use docker inspeckt
docker inspect --format='{{json .State.Health}}' <container-id>
Greetings