Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.
Go aialertsdashboarddockerdocker-monitoringgohomelabinfrastructure-monitoringkubernetesmonitoringmspproxmoxproxmox-backup-serverproxmox-mail-gatewayproxmox-veself-hostedtruenastypescriptvspherewebhooks
chore: update dev scripts and mock configuration
rcourtman66e846019663
diff --git a/mock.env b/mock.envindex 230e7bd35b..5d34edd807 100644--- a/mock.env+++ b/mock.env@@ -1,5 +1,5 @@# Mock Mode Configuration-PULSE_MOCK_MODE=true+PULSE_MOCK_MODE=falsePULSE_MOCK_NODES=7PULSE_MOCK_VMS_PER_NODE=5PULSE_MOCK_LXCS_PER_NODE=8@@ -7,3 +7,4 @@ PULSE_MOCK_DOCKER_HOSTS=3PULSE_MOCK_DOCKER_CONTAINERS=12PULSE_MOCK_RANDOM_METRICS=truePULSE_MOCK_STOPPED_PERCENT=20+PULSE_LICENSE_PUBLIC_KEY="OzbVzmg+TaSGt0eWzDVpn0QkqhOzJqUbOFvSF3AmuRU="diff --git a/scripts/hot-dev.sh b/scripts/hot-dev.shindex 8e6ecbe220..58f973a97e 100755--- a/scripts/hot-dev.sh+++ b/scripts/hot-dev.sh@@ -409,11 +409,14 @@ fi# --- Backend Health Monitor ---# Restarts Pulse if it dies unexpectedly (not from file watcher rebuild)+# IMPORTANT: Enforces single-instance - kills duplicates if foundlog_info "Starting backend health monitor..."(while true; dosleep 10- if ! pgrep -f "^\./pulse$" > /dev/null 2>&1; then+ PULSE_COUNT=$(pgrep -f "^\./pulse$" 2>/dev/null | wc -l | tr -d ' ')++ if [[ "$PULSE_COUNT" -eq 0 ]]; thenlog_warn "⚠️ Pulse died unexpectedly, restarting..."LOG_LEVEL=debug \FRONTEND_PORT="${PULSE_DEV_API_PORT:-7655}" \@@ -433,6 +436,28 @@ log_info "Starting backend health monitor..."elselog_error "✗ Backend failed to auto-restart!"fi+ elif [[ "$PULSE_COUNT" -gt 1 ]]; then+ log_error "⚠️ Multiple Pulse processes detected ($PULSE_COUNT), killing all and restarting..."+ pkill -9 -f "^\./pulse$" 2>/dev/null || true+ sleep 2+ LOG_LEVEL=debug \+ FRONTEND_PORT="${PULSE_DEV_API_PORT:-7655}" \+ PORT="${PULSE_DEV_API_PORT:-7655}" \+ PULSE_DATA_DIR="${PULSE_DATA_DIR:-}" \+ PULSE_ENCRYPTION_KEY="${PULSE_ENCRYPTION_KEY:-}" \+ ALLOW_ADMIN_BYPASS="${ALLOW_ADMIN_BYPASS:-1}" \+ PULSE_DEV="${PULSE_DEV:-true}" \+ PULSE_AUTH_USER="${PULSE_AUTH_USER:-}" \+ PULSE_AUTH_PASS="${PULSE_AUTH_PASS:-}" \+ ALLOWED_ORIGINS="${ALLOWED_ORIGINS:-}" \+ ./pulse >> /tmp/pulse-debug.log 2>&1 &+ NEW_PID=$!+ sleep 2+ if kill -0 "$NEW_PID" 2>/dev/null; then+ log_info "✓ Backend restarted after killing duplicates (PID: $NEW_PID)"+ else+ log_error "✗ Backend failed to restart after killing duplicates!"+ fifidone) &@@ -446,15 +471,13 @@ log_info "Starting backend file watcher..."restart_backend() {log_info "Restarting backend..."-- OLD_PID=$(pgrep -f "^\./pulse$" || true)- if [[ -n "$OLD_PID" ]]; then- kill "$OLD_PID" 2>/dev/null || true- sleep 1- if kill -0 "$OLD_PID" 2>/dev/null; then- kill -9 "$OLD_PID" 2>/dev/null || true- fi- fi++ # Kill ALL pulse processes (not just one) to prevent duplicates+ pkill -f "^\./pulse$" 2>/dev/null || true+ sleep 1+ # Force kill any remaining+ pkill -9 -f "^\./pulse$" 2>/dev/null || true+ sleep 1LOG_LEVEL=debug \FRONTEND_PORT="${PULSE_DEV_API_PORT:-7655}" \@@ -470,8 +493,13 @@ log_info "Starting backend file watcher..."NEW_PID=$!sleep 1- if kill -0 "$NEW_PID" 2>/dev/null; then+ # Verify exactly one process is running+ PULSE_COUNT=$(pgrep -f "^\./pulse$" 2>/dev/null | wc -l | tr -d ' ')+ if [[ "$PULSE_COUNT" -eq 1 ]] && kill -0 "$NEW_PID" 2>/dev/null; thenlog_info "✓ Backend restarted (PID: $NEW_PID)"+ elif [[ "$PULSE_COUNT" -gt 1 ]]; then+ log_error "✗ Multiple processes after restart ($PULSE_COUNT) - killing all"+ pkill -9 -f "^\./pulse$" 2>/dev/null || trueelselog_error "✗ Backend failed to start! Check /tmp/pulse-debug.log"fidiff --git a/scripts/sync-production-config.sh b/scripts/sync-production-config.shindex 727c79fc4a..d6eba36600 100755--- a/scripts/sync-production-config.sh+++ b/scripts/sync-production-config.sh@@ -11,6 +11,13 @@ DEV_DIR=${DEV_DIR:-"/opt/pulse/tmp/dev-config"}mkdir -p "$DEV_DIR"chmod 700 "$DEV_DIR"+# If production config is missing, skip sync and let dev config stand alone.+if [ ! -d "$PROD_DIR" ]; then+ echo "⚠ Production config directory not found: $PROD_DIR"+ echo "✓ Skipping production sync; using dev-only config in $DEV_DIR"+ exit 0+fi+# Copy essential production config files to dev# Skip session/csrf/alert files which are runtime-specificecho "Syncing production config to dev environment..."diff --git a/scripts/toggle-mock.sh b/scripts/toggle-mock.shindex 214e7cd78f..a21244edcc 100755--- a/scripts/toggle-mock.sh+++ b/scripts/toggle-mock.sh@@ -9,8 +9,9 @@ YELLOW='\033[1;33m'BLUE='\033[0;34m'NC='\033[0m' # No Color-MOCK_ENV_FILE="/opt/pulse/mock.env"-ROOT_DIR="/opt/pulse"+SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"+ROOT_DIR="$(dirname "$SCRIPT_DIR")"+MOCK_ENV_FILE="${ROOT_DIR}/mock.env"BACKEND_PORT=7656DEV_DATA_DIR="${ROOT_DIR}/tmp/dev-config"DEV_KEY_FILE="${DEV_DATA_DIR}/.encryption.key"