Some checks failed
Deploy to Phoenix / deploy (push) Has been cancelled
- ADD_CHAIN138_TO_LEDGER_LIVE: Ledger form done; public code review repo bis-innovations/LedgerLive; init/push commands - CONTRACT_DEPLOYMENT_RUNBOOK: Chain 138 gas price 1 gwei, 36-addr check, TransactionMirror workaround - CONTRACT_*: AddressMapper, MirrorManager deployed 2026-02-12; 36-address on-chain check - NEXT_STEPS_FOR_YOU: Ledger done; steps completable now (no LAN); run-completable-tasks-from-anywhere - MASTER_INDEX, OPERATOR_OPTIONAL, SMART_CONTRACTS_INVENTORY_SIMPLE: updates - LEDGER_BLOCKCHAIN_INTEGRATION_COMPLETE: bis-innovations/LedgerLive reference Co-authored-by: Cursor <cursoragent@cursor.com>
88 lines
4.1 KiB
Bash
Executable File
88 lines
4.1 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Fix the-order.sankofa.nexus and identify what other VMs should be in NPMplus
|
|
|
|
set -euo pipefail
|
|
|
|
# Load IP configuration
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
PROJECT_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
|
|
source "${PROJECT_ROOT}/config/ip-addresses.conf" 2>/dev/null || true
|
|
|
|
|
|
PROXMOX_HOST="${1:-192.168.11.11}"
|
|
CONTAINER_ID="${2:-10233}"
|
|
|
|
# Based on documentation: VMID 10090 = order-portal-public at ${IP_SERVICE_36:-${IP_SERVICE_36:-${IP_SERVICE_36:-${IP_SERVICE_36:-192.168.11.36}}}}
|
|
# Port likely 80 or 3000 - defaulting to 80 for now
|
|
ORDER_PORT="${3:-80}"
|
|
|
|
echo ""
|
|
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
|
echo "🔧 Fixing the-order.sankofa.nexus Mapping"
|
|
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
|
echo ""
|
|
|
|
# Fix the-order.sankofa.nexus to point to order-portal-public
|
|
ssh -o StrictHostKeyChecking=no root@"$PROXMOX_HOST" "pct exec $CONTAINER_ID -- docker exec -i npmplus node" <<'EOFNODE'
|
|
const Database = require('better-sqlite3');
|
|
const db = new Database('/data/npmplus/database.sqlite');
|
|
|
|
try {
|
|
// Find the-order.sankofa.nexus proxy host
|
|
const hosts = db.prepare('SELECT id, domain_names, forward_host, forward_port FROM proxy_host').all();
|
|
const orderHost = hosts.find(h => {
|
|
const domains = JSON.parse(h.domain_names);
|
|
return domains.includes('the-order.sankofa.nexus');
|
|
});
|
|
|
|
if (!orderHost) {
|
|
console.log('❌ the-order.sankofa.nexus not found in NPMplus');
|
|
process.exit(1);
|
|
}
|
|
|
|
const currentIP = orderHost.forward_host;
|
|
const currentPort = orderHost.forward_port;
|
|
|
|
// Update to order-portal-public (VMID 10090: ${IP_SERVICE_36:-${IP_SERVICE_36:-${IP_SERVICE_36:-${IP_SERVICE_36:-192.168.11.36}}}})
|
|
const newIP = '${IP_SERVICE_36:-${IP_SERVICE_36:-${IP_SERVICE_36:-${IP_SERVICE_36:-192.168.11.36}}}}';
|
|
const newPort = 80; // Default to 80, can be changed
|
|
|
|
if (currentIP === newIP && currentPort === newPort) {
|
|
console.log(`✓ the-order.sankofa.nexus already correctly configured: ${newIP}:${newPort}`);
|
|
} else {
|
|
db.prepare('UPDATE proxy_host SET forward_host = ?, forward_port = ? WHERE id = ?')
|
|
.run(newIP, newPort, orderHost.id);
|
|
console.log(`✓ Updated the-order.sankofa.nexus (ID: ${orderHost.id})`);
|
|
console.log(` From: ${currentIP}:${currentPort}`);
|
|
console.log(` To: ${newIP}:${newPort} (order-portal-public, VMID 10090)`);
|
|
}
|
|
|
|
db.close();
|
|
} catch (err) {
|
|
console.error(`Error: ${err.message}`);
|
|
process.exit(1);
|
|
}
|
|
EOFNODE
|
|
|
|
echo ""
|
|
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
|
echo "📋 Potential Missing VMs from NPMplus"
|
|
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
|
echo ""
|
|
echo "Based on documentation, these services might need NPMplus mappings:"
|
|
echo ""
|
|
echo "Order Services (may need public access):"
|
|
echo " - VMID 10090: order-portal-public (${IP_SERVICE_36:-${IP_SERVICE_36:-${IP_SERVICE_36:-${IP_SERVICE_36:-192.168.11.36}}}}) - ✅ Now mapped to the-order.sankofa.nexus"
|
|
echo " - VMID 10091: order-portal-internal (${IP_SERVICE_35:-${IP_SERVICE_35:-${IP_SERVICE_35:-${IP_SERVICE_35:-192.168.11.35}}}}) - Internal only?"
|
|
echo " - VMID 10092: order-mcp-legal (${IP_MIM_WEB:-192.168.11.37}) - Internal only?"
|
|
echo ""
|
|
echo "Other Services (check if they need public access):"
|
|
echo " - VMID 6200: firefly-1 (${IP_SERVICE_35:-${IP_SERVICE_35:-${IP_SERVICE_35:-${IP_SERVICE_35:-192.168.11.35}}}})"
|
|
echo " - VMID 6201: firefly-ali-1 (192.168.11.57)"
|
|
echo " - VMID 6000: fabric-1 (192.168.11.65)"
|
|
echo " - VMID 6400: indy-1 (192.168.11.64)"
|
|
echo " - VMID 103: omada (192.168.11.30) - Management interface?"
|
|
echo " - VMID 104: gitea (192.168.11.31) - Git repository?"
|
|
echo ""
|
|
echo "Please specify which of these (or others) should be added to NPMplus."
|