增加说明
This commit is contained in:
+11
-11
@@ -28,7 +28,7 @@
|
||||
在云服务器项目目录(包含 `app.py` 的目录)执行:
|
||||
|
||||
```bash
|
||||
cd /path/to/crypto_monitor
|
||||
cd /opt/crypto_monitor/crypto_monitor_okx
|
||||
|
||||
# 可选:清理 Python 缓存,减少小文件传输
|
||||
find . -type d -name __pycache__ -prune -exec rm -rf {} +
|
||||
@@ -40,10 +40,10 @@ tar -czf crypto_monitor.tgz .
|
||||
下载 `crypto_monitor.tgz` 到本机后解压:
|
||||
|
||||
```bash
|
||||
mkdir -p ~/apps
|
||||
cd ~/apps
|
||||
tar -xzf crypto_monitor.tgz -C crypto_monitor
|
||||
cd crypto_monitor
|
||||
mkdir -p /opt/crypto_monitor/crypto_monitor_okx
|
||||
cd /opt/crypto_monitor
|
||||
tar -xzf crypto_monitor.tgz -C crypto_monitor_okx
|
||||
cd crypto_monitor_okx
|
||||
```
|
||||
|
||||
---
|
||||
@@ -108,7 +108,7 @@ curl -4 -Iv --max-time 15 --proxy socks5h://127.0.0.1:1080 https://www.okx.com/a
|
||||
在本机项目目录:
|
||||
|
||||
```bash
|
||||
cd /root/crypto_monitor
|
||||
cd /opt/crypto_monitor/crypto_monitor_okx
|
||||
|
||||
python3 -m venv .venv
|
||||
source .venv/bin/activate
|
||||
@@ -177,7 +177,7 @@ AI_MODEL=你的模型名
|
||||
启动:
|
||||
|
||||
```bash
|
||||
cd ~/apps/crypto_monitor
|
||||
cd /opt/crypto_monitor/crypto_monitor_okx
|
||||
source .venv/bin/activate
|
||||
python app.py
|
||||
```
|
||||
@@ -232,13 +232,13 @@ pm2 startup
|
||||
`pm2` 管理 Python 的常用方式是直接启动解释器:
|
||||
|
||||
```bash
|
||||
cd /root/crypto_monitor
|
||||
cd /opt/crypto_monitor/crypto_monitor_okx
|
||||
|
||||
pm2 start /root/crypto_monitor/.venv/bin/python --name crypto-monitor -- \
|
||||
/root/crypto_monitor/app.py
|
||||
pm2 start /opt/crypto_monitor/crypto_monitor_okx/.venv/bin/python --name crypto-monitor -- \
|
||||
/opt/crypto_monitor/crypto_monitor_okx/app.py
|
||||
```
|
||||
|
||||
> 请把路径里的 `你的用户名` 换成实际用户名;或用 `readlink -f app.py` 得到绝对路径。
|
||||
> 若项目目录与上文不一致,请替换为实际绝对路径;或用 `readlink -f app.py` 得到绝对路径。
|
||||
|
||||
查看日志:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user