douyinWEB/scripts/_check_dy_deploy.py
eric d409e416da Ship physical dual-edge stack, Studio CDP live metrics, and ops tooling.
Capture Neko/WG/network hubs, Studio viewer charts, physical deploy docs, and one-shot scripts so VPS vs physical can be toggled later without losing WIP.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-04 22:42:40 -05:00

15 lines
1.1 KiB
Python

# -*- coding: utf-8 -*-
import paramiko, sys
sys.stdout.reconfigure(encoding='utf-8', errors='replace')
c=paramiko.SSHClient(); c.set_missing_host_key_policy(paramiko.AutoAddPolicy())
c.connect('108.174.50.68',22,'root','Xiao4669805',timeout=30,allow_agent=False,look_for_keys=False)
def run(cmd,t=60):
_,o,e=c.exec_command(cmd,timeout=t); return (o.read()+e.read()).decode('utf-8','replace').strip()
print('=== services ==='); print(run('systemctl is-active douyinweb-api douyinweb-web douyinweb-pb 2>&1 || true'))
print('=== app dir ==='); print(run('ls -la /opt/douyinWEB 2>/dev/null | head -8'))
print('=== bootstrap log ==='); print(run('tail -30 /tmp/bootstrap_dy_nomadro.sh 2>/dev/null | head -5; ls -lh /tmp/douyinweb_deploy.tar.gz 2>/dev/null'))
print('=== ports ==='); print(run('ss -lntp | grep -E "4015|8014|8092|8333" || echo none'))
print('=== nginx ==='); print(run('ls /etc/nginx/conf.d/; curl -s -o /dev/null -w "%{http_code}" http://127.0.0.1:4015/login 2>/dev/null || echo no_web'))
print('=== health ==='); print(run('curl -s http://127.0.0.1:8014/api/health 2>/dev/null | head -c 200 || echo no_api'))
c.close()