-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart.sh
More file actions
32 lines (26 loc) · 1.08 KB
/
start.sh
File metadata and controls
32 lines (26 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/usr/bin/env bash
# start.sh — SOMA production launcher (Linux / macOS)
# First time? Run: node setup.mjs
set -e
echo "==================================================="
echo " SOMA Cognitive OS — Production Launcher"
echo "==================================================="
# ── Kill any lingering SOMA processes ─────────────────
echo ""
echo "[1] Clearing old processes..."
pkill -f "launcher_ULTRA.mjs" 2>/dev/null || true
pkill -f "soma.*server" 2>/dev/null || true
sleep 1
# ── Verify dist/ exists ────────────────────────────────
if [ ! -d "dist" ]; then
echo ""
echo "[!] dist/ not found — building frontend first..."
npm run build
fi
# ── Launch SOMA ────────────────────────────────────────
echo ""
echo "[2] Starting SOMA Core Backend..."
export NODE_ENV=production
export SOMA_LOAD_HEAVY=true
export SOMA_LOAD_TRADING=true
node --max-old-space-size=4096 launcher_ULTRA.mjs