Support .env for server-local Ollama config to avoid git pull conflicts.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -41,6 +41,20 @@
|
||||
|
||||
> **Git 认证:** 若 `git clone` 需要登录,请先在 root 下配置 HTTPS 凭据或 SSH 密钥,再执行部署脚本。
|
||||
|
||||
> **服务器本地配置(Ollama IP 等):** 不要直接改 `config.py`,请使用 `.env` 文件:
|
||||
> ```bash
|
||||
> cp .env.example .env
|
||||
> nano .env # 修改 OLLAMA_HOST=你的局域网IP
|
||||
> pm2 restart trading_studio
|
||||
> ```
|
||||
|
||||
> **git pull 报本地修改冲突?** 执行:
|
||||
> ```bash
|
||||
> git stash push -m "backup" -- config.py llm_service.py
|
||||
> git pull
|
||||
> pm2 restart trading_studio
|
||||
> ```
|
||||
|
||||
### 0.2 首次一键部署
|
||||
|
||||
```bash
|
||||
|
||||
Reference in New Issue
Block a user