chore(infra): migrate 103 production host IP to 180.159.29.143
Update scripts, docs, nginx configs, and release-gate safety checks after the Studio server public IP changed from 58.38.22.103. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -41,7 +41,7 @@ async function main() {
|
||||
const apply = process.argv.includes('--apply');
|
||||
const enableChatBridge = process.argv.includes('--enable-chat-bridge');
|
||||
const databaseUrl = execSync(
|
||||
"ssh -o BatchMode=yes -o ConnectTimeout=8 john@58.38.22.103 \"grep '^DATABASE_URL=' /Users/john/Project/Memind/.env | cut -d= -f2-\"",
|
||||
"ssh -o BatchMode=yes -o ConnectTimeout=8 john@180.159.29.143 \"grep '^DATABASE_URL=' /Users/john/Project/Memind/.env | cut -d= -f2-\"",
|
||||
{ encoding: 'utf8' },
|
||||
).trim();
|
||||
const pool = mysql.createPool({ uri: databaseUrl, connectionLimit: 2 });
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
HOST="${STUDIO_HOST:-john@58.38.22.103}"
|
||||
HOST="${STUDIO_HOST:-john@180.159.29.143}"
|
||||
REMOTE_ROOT="${STUDIO_REMOTE_ROOT:-/Users/john/Project}"
|
||||
|
||||
say() {
|
||||
|
||||
@@ -13,7 +13,7 @@ const port = process.env.GOOSE_V149_PORT || '18049';
|
||||
const host = process.env.GOOSE_V149_HOST || '127.0.0.1';
|
||||
const secret = process.env.GOOSE_SERVER__SECRET_KEY || 'local-v149-dev-secret';
|
||||
const base = `https://${host}:${port}`;
|
||||
const blockedHosts = ['58.38.22.103', '120.26.184.105'];
|
||||
const blockedHosts = ['180.159.29.143', '120.26.184.105'];
|
||||
|
||||
function usage() {
|
||||
return [
|
||||
|
||||
@@ -9,7 +9,7 @@ const host = process.env.GOOSE_V149_HOST || '127.0.0.1';
|
||||
const secret = process.env.GOOSE_SERVER__SECRET_KEY || 'local-v149-dev-secret';
|
||||
const workingDir = process.env.GOOSE_V149_WORKING_DIR || process.cwd();
|
||||
|
||||
const blockedHosts = ['58.38.22.103', '120.26.184.105'];
|
||||
const blockedHosts = ['180.159.29.143', '120.26.184.105'];
|
||||
if (blockedHosts.includes(host)) {
|
||||
console.error(`GOOSE_V149_AGENT_START_FAIL: refusing production host ${host}`);
|
||||
process.exit(1);
|
||||
|
||||
@@ -11,7 +11,7 @@ const workingDir = process.env.GOOSE_V149_WORKING_DIR || process.cwd();
|
||||
const pollMs = Number(process.env.GOOSE_V149_EXECUTOR_POLL_MS || 500);
|
||||
const timeoutMs = Number(process.env.GOOSE_V149_EXECUTOR_TIMEOUT_MS || 30_000);
|
||||
|
||||
const blockedHosts = ['58.38.22.103', '120.26.184.105'];
|
||||
const blockedHosts = ['180.159.29.143', '120.26.184.105'];
|
||||
if (blockedHosts.includes(host)) {
|
||||
console.error(`GOOSE_V149_EXECUTOR_FAIL: refusing production host ${host}`);
|
||||
process.exit(1);
|
||||
|
||||
@@ -13,7 +13,7 @@ const host = process.env.GOOSE_V149_HOST || '127.0.0.1';
|
||||
const secret = process.env.GOOSE_SERVER__SECRET_KEY || 'local-v149-dev-secret';
|
||||
const workingDir = process.env.GOOSE_V149_WORKING_DIR || process.cwd();
|
||||
const base = `https://${host}:${port}`;
|
||||
const blockedHosts = ['58.38.22.103', '120.26.184.105'];
|
||||
const blockedHosts = ['180.159.29.143', '120.26.184.105'];
|
||||
|
||||
if (blockedHosts.includes(host)) {
|
||||
console.error(`GOOSE_V149_HARNESS_FAIL: refusing production host ${host}`);
|
||||
|
||||
@@ -9,7 +9,7 @@ const host = process.env.GOOSE_V149_HOST || '127.0.0.1';
|
||||
const url = `https://${host}:${port}/status`;
|
||||
const maxBuffer = Number(process.env.GOOSE_V149_CHECK_MAX_BUFFER || 64 * 1024 * 1024);
|
||||
|
||||
const blockedHosts = ['58.38.22.103', '120.26.184.105'];
|
||||
const blockedHosts = ['180.159.29.143', '120.26.184.105'];
|
||||
if (blockedHosts.includes(host)) {
|
||||
console.error(`GOOSE_V149_CHECK_FAIL: refusing production host ${host}`);
|
||||
process.exit(1);
|
||||
|
||||
@@ -12,7 +12,7 @@ import { enforceRealLlmGate } from './goose-v149-real-llm-gate.mjs';
|
||||
|
||||
enforceRealLlmGate('check-goosed-v149-memory-loop.mjs');
|
||||
|
||||
const BLOCKED_DB_HOSTS = ['58.38.22.103', '120.26.184.105', 'rds.aliyuncs.com'];
|
||||
const BLOCKED_DB_HOSTS = ['180.159.29.143', '120.26.184.105', 'rds.aliyuncs.com'];
|
||||
const MARKER = `goose-v149-memory-loop-${Date.now()}`;
|
||||
|
||||
function assertLocalDatabase(env = process.env) {
|
||||
|
||||
@@ -53,7 +53,7 @@ const apiUrl =
|
||||
|| 'https://api.deepseek.com/v1';
|
||||
const replyTimeoutMs = Number(process.env.GOOSE_V149_PROVIDER_REPLY_TIMEOUT_MS || 90_000);
|
||||
|
||||
const blockedHosts = ['58.38.22.103', '120.26.184.105'];
|
||||
const blockedHosts = ['180.159.29.143', '120.26.184.105'];
|
||||
if (blockedHosts.includes(host)) {
|
||||
console.error(`GOOSE_V149_PROVIDER_FAIL: refusing production host ${host}`);
|
||||
process.exit(1);
|
||||
|
||||
@@ -17,7 +17,7 @@ const secret = process.env.GOOSE_SERVER__SECRET_KEY || 'local-v149-dev-secret';
|
||||
const workingDir = process.env.GOOSE_V149_WORKING_DIR || process.cwd();
|
||||
const timeoutMs = Number(process.env.GOOSE_V149_REPLY_TIMEOUT_MS || 30_000);
|
||||
|
||||
const blockedHosts = ['58.38.22.103', '120.26.184.105'];
|
||||
const blockedHosts = ['180.159.29.143', '120.26.184.105'];
|
||||
if (blockedHosts.includes(host)) {
|
||||
console.error(`GOOSE_V149_REPLY_SMOKE_FAIL: refusing production host ${host}`);
|
||||
process.exit(1);
|
||||
|
||||
@@ -19,7 +19,7 @@ const serverPath =
|
||||
const pollMs = Number(process.env.GOOSE_V149_SANDBOX_POLL_MS || 500);
|
||||
const timeoutMs = Number(process.env.GOOSE_V149_SANDBOX_TIMEOUT_MS || 30_000);
|
||||
|
||||
const blockedHosts = ['58.38.22.103', '120.26.184.105'];
|
||||
const blockedHosts = ['180.159.29.143', '120.26.184.105'];
|
||||
if (blockedHosts.includes(host)) {
|
||||
console.error(`GOOSE_V149_SANDBOX_FS_FAIL: refusing production host ${host}`);
|
||||
process.exit(1);
|
||||
|
||||
@@ -10,7 +10,7 @@ import path from 'node:path';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
|
||||
const root = path.join(path.dirname(fileURLToPath(import.meta.url)), '..');
|
||||
const HOST = 'john@58.38.22.103';
|
||||
const HOST = 'john@180.159.29.143';
|
||||
const REMOTE_ROOT = '/Users/john/Project/Memind';
|
||||
const TANG = 'a70ff537-8908-486e-9b6c-042e07cc25db';
|
||||
const JOHN_LOCAL = '1c99b83b-0454-474f-a5d2-129d34506a32';
|
||||
|
||||
@@ -4,7 +4,7 @@ set -euo pipefail
|
||||
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
||||
cd "$ROOT"
|
||||
|
||||
HOST="${MEMIND_PROD_HOST:-john@58.38.22.103}"
|
||||
HOST="${MEMIND_PROD_HOST:-john@180.159.29.143}"
|
||||
REMOTE_ROOT="${MEMIND_PROD_ROOT:-/Users/john/Project/Memind}"
|
||||
BUNDLE=".runtime/portal/wechat-mp.bundle.mjs"
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ fail() {
|
||||
|
||||
case "${PG_HOST}" in
|
||||
127.0.0.1|localhost|::1) ;;
|
||||
58.38.22.103|120.26.184.105|*rds.aliyuncs.com*|*tkmind.cn*)
|
||||
180.159.29.143|120.26.184.105|*rds.aliyuncs.com*|*tkmind.cn*)
|
||||
fail "refusing production or remote host: ${PG_HOST}"
|
||||
;;
|
||||
*)
|
||||
|
||||
@@ -10,7 +10,7 @@ import mysql from 'mysql2/promise';
|
||||
|
||||
import { loadMemindEnvFiles } from './memind-runtime-profile.mjs';
|
||||
|
||||
const BLOCKED_DB_HOSTS = new Set(['58.38.22.103', '120.26.184.105', 'rds.aliyuncs.com']);
|
||||
const BLOCKED_DB_HOSTS = new Set(['180.159.29.143', '120.26.184.105', 'rds.aliyuncs.com']);
|
||||
|
||||
function usage() {
|
||||
return [
|
||||
|
||||
@@ -5,4 +5,4 @@ Ali_Secret=YOUR_ALIYUN_ACCESS_KEY_SECRET
|
||||
|
||||
# 可选:证书与 DNS 域名
|
||||
G2_DOMAIN=g2.tkmind.cn
|
||||
G2_PUBLIC_IP=58.38.22.103
|
||||
G2_PUBLIC_IP=180.159.29.143
|
||||
|
||||
@@ -90,7 +90,7 @@ export function prepareGooseV149CheckEnv(env = process.env, rootDir = memindRoot
|
||||
export const GOOSE_CANARY_MODES = new Set(['off', 'all', 'users']);
|
||||
|
||||
const BLOCKED_HOSTS = new Set([
|
||||
'58.38.22.103',
|
||||
'180.159.29.143',
|
||||
'120.26.184.105',
|
||||
'103.tkmind.cn',
|
||||
'105.tkmind.cn',
|
||||
|
||||
@@ -52,7 +52,7 @@ test('resolveGooseTargetForIdentity routes canary users to v149', () => {
|
||||
|
||||
test('assertLoopbackGooseTarget refuses production hosts', () => {
|
||||
assert.throws(
|
||||
() => assertLoopbackGooseTarget('https://58.38.22.103:18006'),
|
||||
() => assertLoopbackGooseTarget('https://180.159.29.143:18006'),
|
||||
/refuses production host/,
|
||||
);
|
||||
});
|
||||
|
||||
@@ -5,7 +5,7 @@ import { randomUUID } from 'node:crypto';
|
||||
import { Readable } from 'node:stream';
|
||||
import { Agent, fetch } from 'undici';
|
||||
|
||||
const blockedHosts = new Set(['58.38.22.103', '120.26.184.105']);
|
||||
const blockedHosts = new Set(['180.159.29.143', '120.26.184.105']);
|
||||
|
||||
export function createV149Client(options = {}) {
|
||||
const host = options.host ?? process.env.GOOSE_V149_HOST ?? '127.0.0.1';
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#
|
||||
# 前置(阿里云控制台):
|
||||
# 1. 云解析 DNS 添加域名 tkmind.cn,NS 改到阿里云(见脚本末尾说明)
|
||||
# 2. 添加 A 记录:g2 -> 58.38.22.103
|
||||
# 2. 添加 A 记录:g2 -> 180.159.29.143
|
||||
# 3. RAM 创建 AccessKey,权限 AliyunDNSFullAccess
|
||||
# 4. cp scripts/g2-aliyun-cert.env.example scripts/g2-aliyun-cert.env 并填入密钥
|
||||
#
|
||||
@@ -92,6 +92,6 @@ echo ""
|
||||
echo "==> 阿里云 DNS 迁移检查清单"
|
||||
echo " 1. 云解析 DNS 已添加 tkmind.cn"
|
||||
echo " 2. 域名注册商 NS 已改为阿里云(例如 vip1.alidns.com / vip2.alidns.com)"
|
||||
echo " 3. A 记录 g2 -> ${G2_PUBLIC_IP:-58.38.22.103}"
|
||||
echo " 3. A 记录 g2 -> ${G2_PUBLIC_IP:-180.159.29.143}"
|
||||
echo " 4. 删除 Cloudflare 上 g2 的 CNAME/代理记录,避免冲突"
|
||||
echo " 5. dig @223.5.5.5 +short ${DOMAIN} A 应返回 ${G2_PUBLIC_IP:-58.38.22.103}"
|
||||
echo " 5. dig @223.5.5.5 +short ${DOMAIN} A 应返回 ${G2_PUBLIC_IP:-180.159.29.143}"
|
||||
|
||||
@@ -254,7 +254,7 @@ ${contentPreview}`;
|
||||
console.log(' 摘要:', pageAfter.summary?.slice(0, 120));
|
||||
console.log(' 内容已变更:', changed ? '是' : '否');
|
||||
|
||||
const publicBase = (process.env.H5_PUBLIC_BASE_URL ?? 'https://58.38.22.103').replace(/\/$/, '');
|
||||
const publicBase = (process.env.H5_PUBLIC_BASE_URL ?? 'https://180.159.29.143').replace(/\/$/, '');
|
||||
const [pubRows] = await pool.query(
|
||||
`SELECT url_slug, status FROM h5_publish_records WHERE id = (SELECT current_publish_id FROM h5_page_records WHERE id = ?)`,
|
||||
[PAGE_ID],
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
set -euo pipefail
|
||||
|
||||
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
||||
HOST="${STUDIO_HOST:-58.38.22.103}"
|
||||
HOST="${STUDIO_HOST:-180.159.29.143}"
|
||||
REMOTE_ROOT="${STUDIO_REMOTE_ROOT:-/Users/john/Project}"
|
||||
RUNTIME_BASE="${DEEP_SEARCH_RUNTIME_BASE:-${REMOTE_ROOT}/deep-search-runtime}"
|
||||
INCOMING="${REMOTE_ROOT}/incoming/deep-search-runtime"
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
set -euo pipefail
|
||||
|
||||
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
||||
HOST="${STUDIO_HOST:-john@58.38.22.103}"
|
||||
HOST="${STUDIO_HOST:-john@180.159.29.143}"
|
||||
REMOTE_ROOT="${STUDIO_REMOTE_ROOT:-/Users/john/Project}"
|
||||
RUNTIME_BASE="${REMOTE_ROOT}/imgproxy-runtime"
|
||||
INCOMING="${REMOTE_ROOT}/incoming/imgproxy-runtime"
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
set -euo pipefail
|
||||
|
||||
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
||||
HOST="${STUDIO_HOST:-john@58.38.22.103}"
|
||||
HOST="${STUDIO_HOST:-john@180.159.29.143}"
|
||||
REMOTE_ROOT="${STUDIO_REMOTE_ROOT:-/Users/john/Project}"
|
||||
DOCKER_BIN="${DOCKER_BIN:-/opt/homebrew/bin/docker}"
|
||||
RUNTIME_BASE="$REMOTE_ROOT/imgproxy-runtime"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
set -euo pipefail
|
||||
|
||||
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
||||
HOST="${STUDIO_HOST:-58.38.22.103}"
|
||||
HOST="${STUDIO_HOST:-180.159.29.143}"
|
||||
REMOTE_USER_ROOT="${STUDIO_USER_ROOT:-/Users/john}"
|
||||
SHARED_MEMIND_ROOT="${STUDIO_SHARED_MEMIND_ROOT:-/Users/john/Project/Memind}"
|
||||
APP_DIR="${REMOTE_USER_ROOT}/MindSpace"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
set -euo pipefail
|
||||
|
||||
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
||||
HOST="${STUDIO_HOST:-58.38.22.103}"
|
||||
HOST="${STUDIO_HOST:-180.159.29.143}"
|
||||
REMOTE_ROOT="${STUDIO_REMOTE_ROOT:-/Users/john/Project}"
|
||||
STABLE_DIR="${REMOTE_ROOT}/Memind"
|
||||
CANDIDATE_BASE="${REMOTE_ROOT}/Memind-candidates"
|
||||
@@ -216,8 +216,8 @@ ssh -o BatchMode=yes -o ConnectTimeout=15 "${HOST}" \
|
||||
&& ssh -o BatchMode=yes -o ConnectTimeout=10 '${EDGE_HOST}' \
|
||||
\"test -f '${EDGE_MOBILE_CONFIG}' \
|
||||
&& test -f '${EDGE_WECHAT_CONFIG}' \
|
||||
&& grep -q 'proxy_pass http://58.38.22.103:8081;' '${EDGE_MOBILE_CONFIG}' \
|
||||
&& grep -q 'proxy_pass http://58.38.22.103:8081;' '${EDGE_WECHAT_CONFIG}' \
|
||||
&& grep -q 'proxy_pass http://180.159.29.143:8081;' '${EDGE_MOBILE_CONFIG}' \
|
||||
&& grep -q 'proxy_pass http://180.159.29.143:8081;' '${EDGE_WECHAT_CONFIG}' \
|
||||
&& ! grep -q 'proxy_pass http://127.0.0.1:${CANARY_TUNNEL_REMOTE_PORT};' '${EDGE_MOBILE_CONFIG}' \
|
||||
&& ! grep -q 'proxy_pass http://127.0.0.1:${CANARY_TUNNEL_REMOTE_PORT};' '${EDGE_WECHAT_CONFIG}' \
|
||||
&& nginx -t >/dev/null 2>&1 \
|
||||
@@ -426,8 +426,8 @@ restore_edge_to_stable() {
|
||||
cp '${EDGE_MOBILE_BACKUP}' '${EDGE_MOBILE_CONFIG}'
|
||||
cp '${EDGE_WECHAT_BACKUP}' '${EDGE_WECHAT_CONFIG}'
|
||||
fi
|
||||
grep -q 'proxy_pass http://58.38.22.103:8081;' '${EDGE_MOBILE_CONFIG}'
|
||||
grep -q 'proxy_pass http://58.38.22.103:8081;' '${EDGE_WECHAT_CONFIG}'
|
||||
grep -q 'proxy_pass http://180.159.29.143:8081;' '${EDGE_MOBILE_CONFIG}'
|
||||
grep -q 'proxy_pass http://180.159.29.143:8081;' '${EDGE_WECHAT_CONFIG}'
|
||||
! grep -q 'proxy_pass http://127.0.0.1:${CANARY_TUNNEL_REMOTE_PORT};' '${EDGE_MOBILE_CONFIG}'
|
||||
! grep -q 'proxy_pass http://127.0.0.1:${CANARY_TUNNEL_REMOTE_PORT};' '${EDGE_WECHAT_CONFIG}'
|
||||
nginx -t >/dev/null
|
||||
@@ -486,8 +486,8 @@ edge_ssh \
|
||||
"set -euo pipefail
|
||||
test -f '${EDGE_MOBILE_CONFIG}'
|
||||
test -f '${EDGE_WECHAT_CONFIG}'
|
||||
grep -q 'proxy_pass http://58.38.22.103:8081;' '${EDGE_MOBILE_CONFIG}'
|
||||
grep -q 'proxy_pass http://58.38.22.103:8081;' '${EDGE_WECHAT_CONFIG}'
|
||||
grep -q 'proxy_pass http://180.159.29.143:8081;' '${EDGE_MOBILE_CONFIG}'
|
||||
grep -q 'proxy_pass http://180.159.29.143:8081;' '${EDGE_WECHAT_CONFIG}'
|
||||
! grep -q 'proxy_pass http://127.0.0.1:${CANARY_TUNNEL_REMOTE_PORT};' '${EDGE_MOBILE_CONFIG}'
|
||||
! grep -q 'proxy_pass http://127.0.0.1:${CANARY_TUNNEL_REMOTE_PORT};' '${EDGE_WECHAT_CONFIG}'
|
||||
cp '${EDGE_MOBILE_CONFIG}' '${EDGE_MOBILE_BACKUP}'
|
||||
@@ -713,7 +713,7 @@ say "Switch the committed 105 nginx upstreams to the isolated canary tunnel"
|
||||
ssh -o BatchMode=yes -o ConnectTimeout=10 "${EDGE_HOST}" /bin/bash <<EDGE_SWITCH
|
||||
set -euo pipefail
|
||||
for config in '${EDGE_MOBILE_CONFIG}' '${EDGE_WECHAT_CONFIG}'; do
|
||||
before_count="\$(grep -cF 'proxy_pass http://58.38.22.103:8081;' "\${config}")"
|
||||
before_count="\$(grep -cF 'proxy_pass http://180.159.29.143:8081;' "\${config}")"
|
||||
[[ "\${before_count}" -gt 0 ]]
|
||||
temp_config="\$(mktemp "\${config}.canary.XXXXXX")"
|
||||
sed 's#proxy_pass http://58\.38\.22\.103:8081;#proxy_pass http://127.0.0.1:${CANARY_TUNNEL_REMOTE_PORT};#g' \
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
set -euo pipefail
|
||||
|
||||
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
||||
HOST="${STUDIO_HOST:-58.38.22.103}"
|
||||
HOST="${STUDIO_HOST:-180.159.29.143}"
|
||||
REMOTE_ROOT="${STUDIO_REMOTE_ROOT:-/Users/john/Project}"
|
||||
APP_DIR="${REMOTE_ROOT}/Memind"
|
||||
INCOMING_DIR="${REMOTE_ROOT}/incoming/memind-portal-runtime"
|
||||
|
||||
@@ -18,7 +18,7 @@ EOF
|
||||
exit 1
|
||||
|
||||
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
||||
HOST="${STUDIO_HOST:-58.38.22.103}"
|
||||
HOST="${STUDIO_HOST:-180.159.29.143}"
|
||||
REMOTE_ROOT="${STUDIO_REMOTE_ROOT:-/Users/john/Project}"
|
||||
APP_NAME="${STUDIO_APP_NAME:-Memind}"
|
||||
APP_DIR="${REMOTE_ROOT}/${APP_NAME}"
|
||||
|
||||
@@ -5,7 +5,7 @@ import path from 'node:path';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
|
||||
const root = path.join(path.dirname(fileURLToPath(import.meta.url)), '..');
|
||||
const HOST = 'john@58.38.22.103';
|
||||
const HOST = 'john@180.159.29.143';
|
||||
const REMOTE_ROOT = '/Users/john/Project/Memind';
|
||||
const NODE103 = '/opt/homebrew/opt/node@24/bin/node';
|
||||
const TANG = 'a70ff537-8908-486e-9b6c-042e07cc25db';
|
||||
|
||||
@@ -4,7 +4,7 @@ set -euo pipefail
|
||||
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
||||
cd "$ROOT"
|
||||
|
||||
HOST="${MEMIND_PROD_HOST:-john@58.38.22.103}"
|
||||
HOST="${MEMIND_PROD_HOST:-john@180.159.29.143}"
|
||||
REMOTE_ROOT="${MEMIND_PROD_ROOT:-/Users/john/Project/Memind}"
|
||||
|
||||
echo "[resume-agent-run] stop guard on ${HOST}"
|
||||
|
||||
@@ -5,7 +5,7 @@ import path from 'node:path';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
|
||||
const root = path.join(path.dirname(fileURLToPath(import.meta.url)), '..');
|
||||
const HOST = 'john@58.38.22.103';
|
||||
const HOST = 'john@180.159.29.143';
|
||||
const REMOTE_ROOT = '/Users/john/Project/Memind';
|
||||
const NODE103 = '/opt/homebrew/opt/node@24/bin/node';
|
||||
const TANG = 'a70ff537-8908-486e-9b6c-042e07cc25db';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
HOST="${STUDIO_HOST:-58.38.22.103}"
|
||||
HOST="${STUDIO_HOST:-180.159.29.143}"
|
||||
STABLE_DIR="${STUDIO_REMOTE_ROOT:-/Users/john/Project}/Memind"
|
||||
PORTAL_CANDIDATE_LABEL="cn.tkmind.memind-portal-candidate"
|
||||
CANARY_PROXY_LABEL="cn.tkmind.memind-canary-proxy"
|
||||
@@ -44,15 +44,15 @@ ssh -o BatchMode=yes -o ConnectTimeout=10 "${EDGE_HOST}" /bin/bash <<EDGE_ROLLBA
|
||||
set -euo pipefail
|
||||
for config in '${EDGE_MOBILE_CONFIG}' '${EDGE_WECHAT_CONFIG}'; do
|
||||
canary_count="\$(grep -cF 'proxy_pass http://127.0.0.1:${CANARY_TUNNEL_REMOTE_PORT};' "\${config}" || true)"
|
||||
stable_count_before="\$(grep -cF 'proxy_pass http://58.38.22.103:8081;' "\${config}" || true)"
|
||||
stable_count_before="\$(grep -cF 'proxy_pass http://180.159.29.143:8081;' "\${config}" || true)"
|
||||
if [[ "\${canary_count}" -eq 0 ]]; then
|
||||
[[ "\${stable_count_before}" -gt 0 ]]
|
||||
continue
|
||||
fi
|
||||
temp_config="\$(mktemp "\${config}.stable.XXXXXX")"
|
||||
sed 's#proxy_pass http://127\.0\.0\.1:${CANARY_TUNNEL_REMOTE_PORT};#proxy_pass http://58.38.22.103:8081;#g' \
|
||||
sed 's#proxy_pass http://127\.0\.0\.1:${CANARY_TUNNEL_REMOTE_PORT};#proxy_pass http://180.159.29.143:8081;#g' \
|
||||
"\${config}" > "\${temp_config}"
|
||||
stable_count="\$(grep -cF 'proxy_pass http://58.38.22.103:8081;' "\${temp_config}")"
|
||||
stable_count="\$(grep -cF 'proxy_pass http://180.159.29.143:8081;' "\${temp_config}")"
|
||||
[[ "\${stable_count}" -eq \$(( stable_count_before + canary_count )) ]]
|
||||
chown root:root "\${temp_config}"
|
||||
chmod 0644 "\${temp_config}"
|
||||
@@ -76,7 +76,7 @@ rm -f "${STABLE_DIR}/.release-drain"
|
||||
|
||||
curl -fsS http://127.0.0.1:8081/api/status >/dev/null
|
||||
printf 'stable_port=8081\n'
|
||||
printf 'edge_upstream=58.38.22.103:8081\n'
|
||||
printf 'edge_upstream=180.159.29.143:8081\n'
|
||||
REMOTE
|
||||
|
||||
echo "103 canary rollback completed; stable Portal remains active on 8081."
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
set -euo pipefail
|
||||
|
||||
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
||||
HOST="${STUDIO_HOST:-58.38.22.103}"
|
||||
HOST="${STUDIO_HOST:-180.159.29.143}"
|
||||
REMOTE_ROOT="${STUDIO_REMOTE_ROOT:-/Users/john/Project}"
|
||||
APP_DIR="${REMOTE_ROOT}/Memind"
|
||||
BACKUP_DIR="${REMOTE_ROOT}/backups/memind"
|
||||
|
||||
@@ -12,7 +12,7 @@ import path from 'node:path';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
|
||||
const root = path.join(path.dirname(fileURLToPath(import.meta.url)), '..');
|
||||
const HOST = 'john@58.38.22.103';
|
||||
const HOST = 'john@180.159.29.143';
|
||||
const REMOTE_ROOT = '/Users/john/Project/Memind';
|
||||
const NODE103 = '/opt/homebrew/opt/node@24/bin/node';
|
||||
const TANG_USER_ID = 'a70ff537-8908-486e-9b6c-042e07cc25db';
|
||||
|
||||
@@ -12,7 +12,7 @@ import path from 'node:path';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
|
||||
const root = path.join(path.dirname(fileURLToPath(import.meta.url)), '..');
|
||||
const HOST = 'john@58.38.22.103';
|
||||
const HOST = 'john@180.159.29.143';
|
||||
const REMOTE_ROOT = '/Users/john/Project/Memind';
|
||||
const NODE103 = '/opt/homebrew/opt/node@24/bin/node';
|
||||
const DEFAULT_TANG_USER_ID = 'a70ff537-8908-486e-9b6c-042e07cc25db';
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* Copy local deepseek-cp provider config to production and rebind Goose executors.
|
||||
*
|
||||
* Usage (from dev machine):
|
||||
* eval "$(ssh john@58.38.22.103 'grep -E "^(DATABASE_URL|TKMIND_API_TARGET|TKMIND_API_TARGETS|TKMIND_SERVER__SECRET_KEY)=" /Users/john/Project/Memind/.env | sed "s/^/TARGET_/"')"
|
||||
* eval "$(ssh john@180.159.29.143 'grep -E "^(DATABASE_URL|TKMIND_API_TARGET|TKMIND_API_TARGETS|TKMIND_SERVER__SECRET_KEY)=" /Users/john/Project/Memind/.env | sed "s/^/TARGET_/"')"
|
||||
* node scripts/sync-deepseek-cp-prod.mjs
|
||||
*/
|
||||
import fs from 'node:fs';
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
# bash scripts/sync-token-optimization-env-103.sh --apply # write + restart portal
|
||||
set -euo pipefail
|
||||
|
||||
HOST="${MEMIND_103_HOST:-john@58.38.22.103}"
|
||||
HOST="${MEMIND_103_HOST:-john@180.159.29.143}"
|
||||
REMOTE_ENV="/Users/john/Project/Memind/.env"
|
||||
APPLY=0
|
||||
if [[ "${1:-}" == "--apply" ]]; then
|
||||
|
||||
@@ -46,7 +46,7 @@ const REMOTE_SCRIPT = [
|
||||
|
||||
function parseArgs(argv) {
|
||||
const options = {
|
||||
host: process.env.STUDIO_HOST ?? '58.38.22.103',
|
||||
host: process.env.STUDIO_HOST ?? '180.159.29.143',
|
||||
commit: null,
|
||||
artifact: path.join(ROOT, '.runtime', 'portal'),
|
||||
};
|
||||
|
||||
@@ -27,7 +27,7 @@ function previewMessage(message, index) {
|
||||
|
||||
async function load103Env() {
|
||||
const { execSync } = await import('node:child_process');
|
||||
const envText = execSync('ssh -o BatchMode=yes john@58.38.22.103 cat /Users/john/Project/Memind/.env', {
|
||||
const envText = execSync('ssh -o BatchMode=yes john@180.159.29.143 cat /Users/john/Project/Memind/.env', {
|
||||
encoding: 'utf8',
|
||||
});
|
||||
const dbLine = envText.match(/^DATABASE_URL=(.+)$/m)?.[1]?.trim().replace(/^["']|["']$/g, '');
|
||||
@@ -49,7 +49,7 @@ async function load103Env() {
|
||||
async function fetchGooseSession(secret, sid) {
|
||||
const { execSync } = await import('node:child_process');
|
||||
const json = execSync(
|
||||
`ssh -o BatchMode=yes john@58.38.22.103 'SECRET=$(grep ^TKMIND_SERVER__SECRET_KEY= /Users/john/Project/Memind/.env | cut -d= -f2- | tr -d "\\""); curl -k -sf "https://127.0.0.1:18006/sessions/${sid}" -H "X-Secret-Key: $SECRET"'`,
|
||||
`ssh -o BatchMode=yes john@180.159.29.143 'SECRET=$(grep ^TKMIND_SERVER__SECRET_KEY= /Users/john/Project/Memind/.env | cut -d= -f2- | tr -d "\\""); curl -k -sf "https://127.0.0.1:18006/sessions/${sid}" -H "X-Secret-Key: $SECRET"'`,
|
||||
{ encoding: 'utf8', maxBuffer: 10 * 1024 * 1024 },
|
||||
);
|
||||
return JSON.parse(json);
|
||||
|
||||
@@ -44,7 +44,7 @@ function fail(label, detail = '') {
|
||||
|
||||
async function loadProdDatabaseUrl() {
|
||||
return execSync(
|
||||
"ssh -o BatchMode=yes -o ConnectTimeout=8 john@58.38.22.103 \"grep '^DATABASE_URL=' /Users/john/Project/Memind/.env | cut -d= -f2-\"",
|
||||
"ssh -o BatchMode=yes -o ConnectTimeout=8 john@180.159.29.143 \"grep '^DATABASE_URL=' /Users/john/Project/Memind/.env | cut -d= -f2-\"",
|
||||
{ encoding: 'utf8' },
|
||||
).trim();
|
||||
}
|
||||
@@ -52,7 +52,7 @@ async function loadProdDatabaseUrl() {
|
||||
async function read103Env(pattern) {
|
||||
try {
|
||||
const out = execSync(
|
||||
`ssh -o BatchMode=yes -o ConnectTimeout=8 john@58.38.22.103 'grep -E "${pattern}" /Users/john/Project/Memind/.env || true'`,
|
||||
`ssh -o BatchMode=yes -o ConnectTimeout=8 john@180.159.29.143 'grep -E "${pattern}" /Users/john/Project/Memind/.env || true'`,
|
||||
{ encoding: 'utf8' },
|
||||
).trim();
|
||||
return out.split('\n').filter(Boolean);
|
||||
|
||||
Reference in New Issue
Block a user