Add server update script and package-lock changes
This commit is contained in:
1 parent
4cf5d2bdcb
commit
5174a14d76
2 files changed
+35
-2
No files matched your search
Generated
+2
-2
@@ -1,11 +1,11 @@
|
||||
{
|
||||
"name": "resource-monitor",
|
||||
"name": "skywatch",
|
||||
"version": "1.0.0",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "resource-monitor",
|
||||
"name": "skywatch",
|
||||
"version": "1.0.0",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
#!/bin/bash
|
||||
# Quick update script for SkyWatch on remote server
|
||||
# Run this on the server: bash update-server.sh
|
||||
|
||||
set -e
|
||||
|
||||
echo "🔄 Updating SkyWatch..."
|
||||
|
||||
cd /opt/resource-monitor
|
||||
|
||||
echo "📥 Pulling latest code..."
|
||||
git pull origin main
|
||||
|
||||
echo "📦 Installing dependencies..."
|
||||
rm -rf node_modules package-lock.json
|
||||
npm ci --only=production 2>&1 | tail -20
|
||||
|
||||
echo "🔄 Restarting application..."
|
||||
pm2 restart resource-monitor
|
||||
|
||||
echo "✅ Waiting for startup..."
|
||||
sleep 3
|
||||
|
||||
echo "📋 Checking status..."
|
||||
pm2 status resource-monitor
|
||||
|
||||
echo ""
|
||||
echo "📊 Recent logs (checking for database migration):"
|
||||
pm2 logs resource-monitor --lines 30 --nostream
|
||||
|
||||
echo ""
|
||||
echo "✅ Update complete!"
|
||||
echo "🌐 Check your dashboard at http://$(hostname -I | awk '{print $1}'):3001"
|
||||
Reference in new issue
Block a user