Use 比特骆驼 logo for PWA/brand marks, remove install button, docs Ubuntu 22.04 only.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -8,6 +8,15 @@
|
||||
|
||||
仓库:<https://git.bz121.com/dekun/eth_hedge_sim.git>
|
||||
|
||||
## 运行环境
|
||||
|
||||
| 项 | 约定 |
|
||||
|----|------|
|
||||
| 操作系统 | **Ubuntu 22.04** LTS |
|
||||
| 进程管理 | PM2(`eth-hedge-api`) |
|
||||
| 安装目录 | `/opt/eth_hedge_sim` |
|
||||
| 端口 | **5155** |
|
||||
|
||||
## 文档
|
||||
|
||||
- [开发方案](docs/开发方案.md)
|
||||
@@ -21,11 +30,10 @@
|
||||
- 反代:[`https://dc.hyf2.cc`](https://dc.hyf2.cc) → 本机 `5155`(PM2: `eth-hedge-api`)
|
||||
- 登录账号:见服务器 `/opt/eth_hedge_sim/.env` 的 `AUTH_USERNAME` / `AUTH_PASSWORD`
|
||||
- 可在「系统设置」修改用户名/密码;前端固定同源 API,无 API 地址配置项
|
||||
- 支持电脑 / 平板安装为独立应用(PWA)
|
||||
|
||||
## 一键部署 / 更新(禁止 scp 传代码)
|
||||
|
||||
服务器目录:`/opt/eth_hedge_sim`
|
||||
目标机:**Ubuntu 22.04**,目录 `/opt/eth_hedge_sim`。
|
||||
更新方式:**只允许 `git pull`**,然后构建并 `pm2 startOrReload` 本项目进程。
|
||||
|
||||
### 推荐:curl 一键管理器(菜单)
|
||||
@@ -47,30 +55,33 @@ curl -fsSL https://git.bz121.com/dekun/eth_hedge_sim/raw/branch/main/deploy/mana
|
||||
bash /opt/eth_hedge_sim/deploy/manage.sh
|
||||
```
|
||||
|
||||
### 本机触发远程更新
|
||||
### 从开发机触发远程更新(可选)
|
||||
|
||||
在能 SSH 到 Ubuntu 服务器的机器上:
|
||||
|
||||
```bash
|
||||
pip install paramiko
|
||||
set DEPLOY_PASS=*** # Windows PowerShell: $env:DEPLOY_PASS='***'
|
||||
export DEPLOY_PASS='***'
|
||||
python scripts/deploy_remote.py
|
||||
```
|
||||
|
||||
PM2 进程名:`eth-hedge-api`(端口 **5155**)。禁止 `pm2 restart all`。
|
||||
|
||||
## 本地开发
|
||||
## 服务器上本地开发 / 调试(Ubuntu 22.04)
|
||||
|
||||
```bash
|
||||
python -m venv .venv
|
||||
.venv\Scripts\activate
|
||||
cd /opt/eth_hedge_sim
|
||||
python3 -m venv .venv
|
||||
source .venv/bin/activate
|
||||
pip install -r requirements.txt
|
||||
copy .env.example .env
|
||||
cp .env.example .env
|
||||
|
||||
python scripts/smoke_market.py
|
||||
cd backend
|
||||
uvicorn app.main:app --host 0.0.0.0 --port 5155 --reload
|
||||
|
||||
# 另开终端
|
||||
cd frontend
|
||||
cd /opt/eth_hedge_sim/frontend
|
||||
npm ci
|
||||
npm run dev
|
||||
```
|
||||
@@ -81,3 +92,4 @@ npm run dev
|
||||
- 永续市价;期权只吃买卖一;滑点 = 1×手续费
|
||||
- 仓位:永续 1 ETH,期权 2 ETH 名义
|
||||
- 部署更新只用 git pull,不用 scp
|
||||
- 部署环境固定为 Ubuntu 22.04
|
||||
|
||||
Reference in New Issue
Block a user