Add curl|bash manage.sh with deploy/uninstall/update menu.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-07-25 08:47:35 +08:00
parent e19bb452f9
commit 2a29181a90
9 changed files with 533 additions and 32 deletions
+14 -8
View File
@@ -21,17 +21,23 @@
服务器目录:`/opt/eth_hedge_sim`
更新方式:**只允许 `git pull`**,然后构建并 `pm2 startOrReload` 本项目进程。
### 服务器上
### 推荐:curl 一键管理器(菜单)
```bash
# 首次
export REPO_URL=https://git.bz121.com/dekun/eth_hedge_sim.git
bash /opt/eth_hedge_sim/deploy/bootstrap.sh
# 若尚未 clone
# git clone "$REPO_URL" /opt/eth_hedge_sim && bash /opt/eth_hedge_sim/deploy/bootstrap.sh
curl -fsSL https://git.bz121.com/dekun/eth_hedge_sim/raw/branch/main/deploy/manage.sh | bash
```
# 日常更新
bash /opt/eth_hedge_sim/deploy/pull_and_restart.sh
菜单:
1. 一键部署
2. 一键卸载(仅停删 `eth-hedge-api`,移走目录并备份 `.env`
3. 更新(`git pull` + 构建 + reload
0. 退出
已安装后也可:
```bash
bash /opt/eth_hedge_sim/deploy/manage.sh
```
### 本机触发远程更新