文档修改
This commit is contained in:
+13
-13
@@ -25,13 +25,13 @@
|
||||
将包含 `app.py` 的项目放到固定目录,例如:
|
||||
|
||||
```bash
|
||||
mkdir -p /opt/crypto_monitor
|
||||
cd /opt/crypto_monitor
|
||||
git clone https://git.bz121.com/dekun/crypto_monitor.git
|
||||
cd crypto_monitor/crypto_monitor_gate
|
||||
mkdir -p /opt/crypto_monitor_user
|
||||
cd /opt/crypto_monitor_user
|
||||
git clone https://git.bz121.com/dekun/crypto_monitor_user.git
|
||||
cd crypto_monitor_user/crypto_monitor_gate
|
||||
```
|
||||
|
||||
下文用 **`/opt/crypto_monitor/crypto_monitor_gate`** 仅为示例,请换成你的实际绝对路径。
|
||||
下文用 **`/opt/crypto_monitor_user/crypto_monitor_gate`** 仅为示例,请换成你的实际绝对路径。
|
||||
|
||||
拉取代码后,若目录下尚无 `.env`:
|
||||
|
||||
@@ -97,7 +97,7 @@ curl -4 -sS --max-time 15 --proxy socks5h://127.0.0.1:1080 https://api.gateio.ws
|
||||
## 4. Python 虚拟环境
|
||||
|
||||
```bash
|
||||
cd /opt/crypto_monitor/crypto_monitor_gate
|
||||
cd /opt/crypto_monitor_user/crypto_monitor_gate
|
||||
|
||||
python3 -m venv .venv
|
||||
source .venv/bin/activate
|
||||
@@ -125,7 +125,7 @@ export PYTHONDONTWRITEBYTECODE=1
|
||||
### 5.1 首次配置
|
||||
|
||||
```bash
|
||||
cd /opt/crypto_monitor/crypto_monitor_gate
|
||||
cd /opt/crypto_monitor_user/crypto_monitor_gate
|
||||
|
||||
cp -n .env.example .env
|
||||
nano .env
|
||||
@@ -143,7 +143,7 @@ nano .env
|
||||
与 Binance 实例相同:每天 **北京时间 0:00** → **`/root/backups`**,保留 **30 天**。
|
||||
|
||||
```bash
|
||||
cd /opt/crypto_monitor/crypto_monitor_gate
|
||||
cd /opt/crypto_monitor_user/crypto_monitor_gate
|
||||
chmod +x scripts/backup_data.sh scripts/install_backup_cron.sh
|
||||
bash scripts/install_backup_cron.sh
|
||||
bash scripts/backup_data.sh # 试跑
|
||||
@@ -185,7 +185,7 @@ GATE_SOCKS_PROXY=socks5h://127.0.0.1:1080
|
||||
3. `.env` 已含 `GATE_SOCKS_PROXY`
|
||||
|
||||
```bash
|
||||
cd /opt/crypto_monitor/crypto_monitor_gate
|
||||
cd /opt/crypto_monitor_user/crypto_monitor_gate
|
||||
source .venv/bin/activate
|
||||
python app.py
|
||||
```
|
||||
@@ -208,7 +208,7 @@ pm2 -v
|
||||
在项目根目录:
|
||||
|
||||
```bash
|
||||
cd /opt/crypto_monitor/crypto_monitor_gate
|
||||
cd /opt/crypto_monitor_user/crypto_monitor_gate
|
||||
pm2 start ecosystem.config.cjs
|
||||
pm2 status
|
||||
pm2 logs --lines 200
|
||||
@@ -245,9 +245,9 @@ ssh -N -D 127.0.0.1:1080 gate-vps \
|
||||
### 9.2 Flask
|
||||
|
||||
```bash
|
||||
cd /opt/crypto_monitor/crypto_monitor_gate
|
||||
pm2 start /opt/crypto_monitor/crypto_monitor_gate/.venv/bin/python --name crypto-monitor-gate -- \
|
||||
/opt/crypto_monitor/crypto_monitor_gate/app.py
|
||||
cd /opt/crypto_monitor_user/crypto_monitor_gate
|
||||
pm2 start /opt/crypto_monitor_user/crypto_monitor_gate/.venv/bin/python --name crypto-monitor-gate -- \
|
||||
/opt/crypto_monitor_user/crypto_monitor_gate/app.py
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
Reference in New Issue
Block a user