SogeBot
sogeBot - Free Twitch Bot built on Node.js https://sogebot.xyz/
Ports
Add an allocation on the node for each port.
- Game (HTTP Server) 20000
Install
- Installer image
- node:18-bookworm-slim
- Install script
- 59 lines
Image
- Node.js 18 ghcr.io/ptero-eggs/yolks:nodejs_18
Startup
The Panel runs this command to start the server. It replaces each variable in the command with the value of that variable.
1 variable
Startup command
npm startVersion to install. Latest will install the latest available version.
VERSIONUsers can edit
required|string|max:20
Wings
- Stop command
- ^C (SIGINT)
- Running when the console shows
- WebPanel is available at
Files Wings edits
Wings sets these values in these files before each start.
.env properties
- PORT
- {{server.build.default.port}}
Readme
Problem with this egg?
Open an issue on GitHub. Include your Panel and Wings versions.
Install script 59 lines bash in node:18-bookworm-slim Show Hide
#/bin/bash
# Installscript for sogeBot | Author: eggs@goover.dev
export DEBIAN_FRONTEND=noninteractive
apt -y update
apt install -y curl unzip jq python3 build-essential ca-certificates
mkdir -p /mnt/server
cd /mnt/server
export NODE_OPTIONS=--max-old-space-size=8192
chown -R root:root /mnt
#Backup database & config
mkdir -p .backup
cp -f .env /mnt/server/.backup
cp -f sogebot.db /mnt/server/.backup
#delete old dir's to prevent errors on update
rm -fR dest
rm -fR public
rm -fR node-modules
rm -fR tools
## get release info and download links
LATEST_JSON=$(curl --silent "https://api.github.com/repos/sogebot/sogeBot/releases/latest")
RELEASES=$(curl --silent "https://api.github.com/repos/sogebot/sogeBot/releases")
MATCH=sogeBot
if [ -z "${VERSION}" ] || [ "${VERSION}" == "latest" ]; then
DOWNLOAD_LINK=$(echo ${LATEST_JSON} | jq .assets | jq -r .[].browser_download_url | grep -i ${MATCH})
else
VERSION_CHECK=$(echo ${RELEASES} | jq -r --arg VERSION "${VERSION}" '.[] | select(.tag_name==$VERSION) | .tag_name')
if [ "${VERSION}" == "${VERSION_CHECK}" ]; then
DOWNLOAD_LINK=$(echo ${RELEASES} | jq -r --arg VERSION "${VERSION}" '.[] | select(.tag_name==$VERSION) | .assets[].browser_download_url' | grep -i ${MATCH})
else
echo -e "defaulting to latest release"
DOWNLOAD_LINK=$(echo ${LATEST_JSON} | jq .assets | jq -r .[].browser_download_url)
fi
fi
echo -e "Downloading from $DOWNLOAD_LINK"
curl -sSL -o sogeBot.zip ${DOWNLOAD_LINK}
unzip -o sogeBot.zip
rm -rf sogeBot.zip
echo "--------------------------------------------------------------------------"
echo "Installing dependencies, this will take some time so sit back and relax..."
echo "IGNORE WARNINGS. THESE ARE NOT ERRORS !!!"
echo "--------------------------------------------------------------------------"
npm install -g npm@8
npm install --verbose --force
echo -e "install completed"
exit 0