fix(deploy): 浅克隆说明、README 精简与 Docker 自动安装可观测性
Test start.ps1 (Windows) / test-windows (push) Waiting to run
Test start.ps1 (Windows) / test-windows (push) Waiting to run
- README: Windows 一条 PowerShell 命令,保留脚本权限说明;合并重复段落 - start.sh/ps1: git clone --depth 1 示例 - start.ps1: 选 [2] 时输出 winget/choco 日志与退出码,失败原因可辨;Read-Host Trim;winget 后若 docker 可用则视为成功 Made-with: Cursor
This commit is contained in:
@@ -3,23 +3,15 @@
|
||||
### Linux/Mac
|
||||
|
||||
```bash
|
||||
git clone https://git.51easyai.com/wangbo/easyai.git && cd easyai && chmod +x start.sh && ./start.sh
|
||||
git clone --depth 1 https://git.51easyai.com/wangbo/easyai.git && cd easyai && chmod +x start.sh && ./start.sh
|
||||
```
|
||||
|
||||
### Windows
|
||||
|
||||
在 PowerShell 中**分行执行**下面三行(不要与 `git clone` 粘成一行且漏掉分号,否则 `-ExecutionPolicy` 可能被当成 `git` 的参数,出现 `error: unknown switch 'E'`):
|
||||
在 **PowerShell** 中执行:
|
||||
|
||||
```powershell
|
||||
git clone "https://git.51easyai.com/wangbo/easyai.git" "easyai"
|
||||
Set-Location ".\easyai"
|
||||
powershell.exe -NoProfile -ExecutionPolicy Bypass -File ".\start.ps1"
|
||||
```
|
||||
|
||||
若必须单行粘贴,请用分号分隔整条命令链:
|
||||
|
||||
```powershell
|
||||
git clone "https://git.51easyai.com/wangbo/easyai.git" "easyai"; Set-Location "easyai"; powershell.exe -NoProfile -ExecutionPolicy Bypass -File ".\start.ps1"
|
||||
git clone --depth 1 "https://git.51easyai.com/wangbo/easyai.git" "easyai"; Set-Location "easyai"; powershell.exe -NoProfile -ExecutionPolicy Bypass -File ".\start.ps1"
|
||||
```
|
||||
|
||||
> **Windows 脚本权限说明**:PowerShell 默认禁止运行脚本,直接双击 `start.ps1` 会闪退。
|
||||
@@ -422,7 +414,7 @@ start.sh 脚本用于服务器一键安装启动EasyAI应用
|
||||
### 首次安装部署步骤,并使用服务器公网IP进行访问
|
||||
1. 克隆脚本和相关文件到服务器
|
||||
```bash
|
||||
git clone https://git.51easyai.com/wangbo/easyai.git
|
||||
git clone --depth 1 https://git.51easyai.com/wangbo/easyai.git
|
||||
# 进入easyai目录
|
||||
cd easyai
|
||||
```
|
||||
@@ -445,45 +437,22 @@ chmod +x start.sh
|
||||
|
||||
## Windows 一键启动
|
||||
|
||||
start.ps1 脚本用于 Windows 本机/局域网一键部署 EasyAI 应用。**不要直接双击运行**(会闪退),请按以下方式执行:
|
||||
**不要双击** `start.ps1`(易闪退)。在 **PowerShell** 中执行:
|
||||
|
||||
### 权限配置(首次执行必做)
|
||||
```powershell
|
||||
git clone --depth 1 "https://git.51easyai.com/wangbo/easyai.git" "easyai"; Set-Location "easyai"; powershell.exe -NoProfile -ExecutionPolicy Bypass -File ".\start.ps1"
|
||||
```
|
||||
|
||||
PowerShell 默认可能禁止运行脚本,需先执行以下任一方式:
|
||||
已在 `easyai` 目录内时:
|
||||
|
||||
**方式一:临时允许本次运行(推荐)**
|
||||
```powershell
|
||||
powershell.exe -NoProfile -ExecutionPolicy Bypass -File ".\start.ps1"
|
||||
```
|
||||
|
||||
**方式二:为当前用户永久放开脚本执行权限**
|
||||
```powershell
|
||||
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
|
||||
```
|
||||
执行后再运行 `.\start.ps1` 即可。
|
||||
|
||||
### 启动步骤
|
||||
|
||||
1. 克隆并进入目录(**请分行执行**,避免把后续命令当成 `git` 的参数)
|
||||
|
||||
```powershell
|
||||
git clone "https://git.51easyai.com/wangbo/easyai.git" "easyai"
|
||||
Set-Location ".\easyai"
|
||||
```
|
||||
|
||||
2. 在 PowerShell 或 CMD 中运行(二选一)
|
||||
|
||||
```powershell
|
||||
# 若已设置 ExecutionPolicy,可直接执行
|
||||
.\start.ps1
|
||||
|
||||
# 未设置时使用 Bypass 方式(推荐带引号的路径)
|
||||
powershell.exe -NoProfile -ExecutionPolicy Bypass -File ".\start.ps1"
|
||||
```
|
||||
|
||||
3. 按提示选择 [1] 本地访问 或 [2] 局域网访问,脚本将自动配置并启动 Docker 服务。
|
||||
|
||||
4. 若窗口闪退,可查看日志 `start.ps1.log`(与 start.ps1 同目录,或 `%TEMP%\start.ps1.log`)获取退出原因。
|
||||
> **Windows 脚本权限说明**:PowerShell 默认禁止运行脚本,直接双击 `start.ps1` 会闪退。
|
||||
>
|
||||
> - **推荐**:使用 `powershell.exe -NoProfile -ExecutionPolicy Bypass -File ".\start.ps1"` 执行,无需修改系统策略
|
||||
> - **或**:以管理员身份打开 PowerShell,执行 `Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser`,之后可直接运行 `.\start.ps1`
|
||||
|
||||
### 启用HTTPS
|
||||
1. [更改为你的域名]修改`easyai-proxy.conf`中域名`51easyai.com`为你的域名[可以使用Ctrl+F批量替换51easyai.com为你的域名]
|
||||
|
||||
Reference in New Issue
Block a user