文档修改
This commit is contained in:
@@ -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_bot
|
||||
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_bot
|
||||
```
|
||||
|
||||
下文用 **`/opt/crypto_monitor/crypto_monitor_gate_bot`** 仅为示例,请换成你的实际绝对路径。
|
||||
下文用 **`/opt/crypto_monitor_user/crypto_monitor_gate_bot`** 仅为示例,请换成你的实际绝对路径。
|
||||
|
||||
拉取代码后,若目录下尚无 `.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_bot
|
||||
cd /opt/crypto_monitor_user/crypto_monitor_gate_bot
|
||||
|
||||
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_bot
|
||||
cd /opt/crypto_monitor_user/crypto_monitor_gate_bot
|
||||
|
||||
cp -n .env.example .env
|
||||
nano .env
|
||||
@@ -143,7 +143,7 @@ nano .env
|
||||
每天 **北京时间 0:00** 备份到 **`/root/backups`**,保留 **30 天**(`crypto.db` + `static/images`)。
|
||||
|
||||
```bash
|
||||
cd /opt/crypto_monitor/crypto_monitor_gate_bot
|
||||
cd /opt/crypto_monitor_user/crypto_monitor_gate_bot
|
||||
chmod +x scripts/backup_data.sh scripts/install_backup_cron.sh
|
||||
bash scripts/install_backup_cron.sh
|
||||
bash scripts/backup_data.sh # 试跑
|
||||
@@ -219,7 +219,7 @@ TREND_PREVIEW_MAX_BALANCE_DRIFT_PCT=5
|
||||
3. `.env` 已含 `GATE_SOCKS_PROXY`
|
||||
|
||||
```bash
|
||||
cd /opt/crypto_monitor/crypto_monitor_gate_bot
|
||||
cd /opt/crypto_monitor_user/crypto_monitor_gate_bot
|
||||
source .venv/bin/activate
|
||||
python app.py
|
||||
```
|
||||
@@ -242,7 +242,7 @@ pm2 -v
|
||||
在项目根目录:
|
||||
|
||||
```bash
|
||||
cd /opt/crypto_monitor/crypto_monitor_gate_bot
|
||||
cd /opt/crypto_monitor_user/crypto_monitor_gate_bot
|
||||
pm2 start ecosystem.config.cjs
|
||||
pm2 status
|
||||
pm2 logs --lines 200
|
||||
@@ -279,9 +279,9 @@ ssh -N -D 127.0.0.1:1080 gate-vps \
|
||||
### 9.2 Flask
|
||||
|
||||
```bash
|
||||
cd /opt/crypto_monitor/crypto_monitor_gate_bot
|
||||
pm2 start /opt/crypto_monitor/crypto_monitor_gate_bot/.venv/bin/python --name crypto-monitor-gate -- \
|
||||
/opt/crypto_monitor/crypto_monitor_gate_bot/app.py
|
||||
cd /opt/crypto_monitor_user/crypto_monitor_gate_bot
|
||||
pm2 start /opt/crypto_monitor_user/crypto_monitor_gate_bot/.venv/bin/python --name crypto-monitor-gate -- \
|
||||
/opt/crypto_monitor_user/crypto_monitor_gate_bot/app.py
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
Reference in New Issue
Block a user