Add build-tool install step to update script

Ensures gcc/g++/python3 are present before npm install so
better-sqlite3 can compile its native binding on a fresh Ubuntu server.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
nmemmertandClaude Sonnet 4.6 committed 2026-08-06 18:19:20 -04:00
1 parent f119168399
commit 0f93d16874
1 file changed
+9
+9
View File
@@ -11,6 +11,15 @@ cd /opt/resource-monitor
echo "📥 Pulling latest code..."
git pull origin main
echo "🔧 Ensuring build tools are present (needed for native modules)..."
if command -v apt-get &>/dev/null; then
apt-get install -y --no-install-recommends make gcc g++ python3 2>&1 | tail -5
elif command -v dnf &>/dev/null; then
dnf install -y make gcc gcc-c++ python3 2>&1 | tail -5
elif command -v yum &>/dev/null; then
yum install -y make gcc gcc-c++ python3 2>&1 | tail -5
fi
echo "📦 Installing dependencies..."
rm -rf node_modules