Document Git clone and update workflow
This commit is contained in:
@@ -56,6 +56,35 @@ crypto-atr-signal
|
||||
└── README.md
|
||||
```
|
||||
|
||||
## 获取与更新项目
|
||||
|
||||
推荐使用 SSH 克隆。Gitea 的 SSH 服务使用 `2222` 端口:
|
||||
|
||||
```bash
|
||||
git clone ssh://git@git.polarisx.net:2222/mikemoi/crypto-atr-signal.git
|
||||
cd crypto-atr-signal
|
||||
```
|
||||
|
||||
也可以使用 HTTPS:
|
||||
|
||||
```bash
|
||||
git clone https://git.polarisx.net/mikemoi/crypto-atr-signal.git
|
||||
cd crypto-atr-signal
|
||||
```
|
||||
|
||||
私有仓库通过 HTTPS 克隆时,请使用 Gitea 用户名和访问令牌,不要把账户密码写进命令或脚本。
|
||||
|
||||
服务器已经部署过项目时,使用以下命令获取最新版本:
|
||||
|
||||
```bash
|
||||
cd /www/wwwroot/crypto-atr-signal
|
||||
git pull --ff-only origin main
|
||||
.venv/bin/pip install -r requirements.txt
|
||||
sudo systemctl restart crypto-atr-signal
|
||||
```
|
||||
|
||||
`.env`、`data/app.db`、日志和虚拟环境已被 `.gitignore` 排除,执行 `git pull` 不会覆盖这些本地运行数据。更新前不要删除 `data` 目录或 `.env` 文件。
|
||||
|
||||
## 安装
|
||||
|
||||
```bash
|
||||
|
||||
Reference in New Issue
Block a user