Initial commit
This commit is contained in:
Executable
+36
@@ -0,0 +1,36 @@
|
||||
#!/bin/bash
|
||||
# 快速同步代码到新服务器并重启 - 152.136.182.184 (stock.allbyai.cn)
|
||||
# 用于日常代码更新
|
||||
|
||||
set -e
|
||||
|
||||
NEW_SERVER="ubuntu@152.136.182.184"
|
||||
APP_DIR="/opt/stock-app"
|
||||
LOCAL_DIR="/Users/freedak/Documents/go-new/stock/stock-html"
|
||||
|
||||
echo "同步代码到 stock.allbyai.cn (152.136.182.184)..."
|
||||
|
||||
rsync -avz ${LOCAL_DIR}/ ${NEW_SERVER}:${APP_DIR}/ \
|
||||
--exclude='.git' \
|
||||
--exclude='venv' \
|
||||
--exclude='__pycache__' \
|
||||
--exclude='stock_data_cache' \
|
||||
--exclude='*.pyc' \
|
||||
--exclude='.DS_Store' \
|
||||
--exclude='stock_names.json' \
|
||||
--exclude='alerts_cache.json' \
|
||||
--exclude='trades.json' \
|
||||
--exclude='watchlist.json' \
|
||||
--exclude='*.log' \
|
||||
--exclude='.playwright-mcp' \
|
||||
--exclude='/app.js' \
|
||||
--exclude='/index.html' \
|
||||
--exclude='/main.css' \
|
||||
--exclude='/css' \
|
||||
--exclude='/js' \
|
||||
--exclude='/.windsurfrules'
|
||||
|
||||
ssh ${NEW_SERVER} "systemctl restart stock-app && echo '✅ 服务已重启'"
|
||||
|
||||
echo ""
|
||||
echo "访问: http://stock.allbyai.cn"
|
||||
Reference in New Issue
Block a user