Skip to content

Commit 7db4071

Browse files
committed
docs: 修改版本信息以及windows下的镜像拉取问题
1 parent 12c7aeb commit 7db4071

File tree

6 files changed

+68
-7
lines changed

6 files changed

+68
-7
lines changed

.env.template

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ SAVE_DIR=./saves
44
# region model_provider
55
# 推荐使用硅基流动免费服务
66
SILICONFLOW_API_KEY=
7+
# 获取搜索服务的 api key 请访问 https://app.tavily.com/
8+
TAVILY_API_KEY=
79

810
# # 其余可选配置
911
# OPENAI_API_KEY=
@@ -15,9 +17,6 @@ SILICONFLOW_API_KEY=
1517
# TOGETHER_API_KEY=
1618
# # endregion model_provider
1719

18-
# # 功能服务
19-
# TAVILY_API_KEY=
20-
2120
# # 基础配置示例
2221
# MYSQL_HOST=192.168.1.100
2322
# MYSQL_USER=username

docker-compose.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ services:
66
args:
77
HTTP_PROXY: ${HTTP_PROXY:-}
88
HTTPS_PROXY: ${HTTPS_PROXY:-}
9-
image: yuxi-api:0.3.dev
9+
image: yuxi-api:0.4.dev
1010
container_name: api-dev
1111
working_dir: /app
1212
volumes:
@@ -62,7 +62,7 @@ services:
6262
context: .
6363
dockerfile: docker/web.Dockerfile
6464
target: development
65-
image: yuxi-web:0.3.dev
65+
image: yuxi-web:0.4.dev
6666
container_name: web-dev
6767
volumes:
6868
- ./web/src:/app/src

docker/pull_image.ps1

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
param(
2+
[Parameter(Mandatory=$true)]
3+
[string]$ImageTag
4+
)
5+
6+
# 当命令失败时,立即退出脚本
7+
$ErrorActionPreference = "Stop"
8+
9+
Write-Host "Pulling image: $ImageTag" -ForegroundColor Green
10+
11+
# 计算斜杠数量来确定镜像格式
12+
$slashCount = ($ImageTag -split '/' | Measure-Object).Count - 1
13+
14+
# 根据镜像格式设置镜像 URL
15+
switch ($slashCount) {
16+
0 {
17+
# 无前缀 (例如: python:3.12-slim)
18+
$mirrorUrl = "m.daocloud.io/docker.io/library"
19+
Write-Host "Image format: Official image (no prefix)" -ForegroundColor Cyan
20+
}
21+
1 {
22+
# 一个前缀 (例如: milvusdb/milvus:latest)
23+
$mirrorUrl = "m.daocloud.io/docker.io"
24+
Write-Host "Image format: Hub repository (one prefix)" -ForegroundColor Cyan
25+
}
26+
default {
27+
# 两个或更多前缀 (例如: quay.io/coreos/etcd:v3.5.5)
28+
$mirrorUrl = "m.daocloud.io"
29+
Write-Host "Image format: Third-party registry (multiple prefixes)" -ForegroundColor Cyan
30+
}
31+
}
32+
33+
$fullMirrorUrl = "$mirrorUrl/$ImageTag"
34+
Write-Host "Mirror URL: $fullMirrorUrl" -ForegroundColor Yellow
35+
36+
try {
37+
# 从镜像加速器拉取镜像
38+
Write-Host "Step 1: Pulling image from mirror..." -ForegroundColor Blue
39+
docker pull $fullMirrorUrl
40+
41+
# 重新标记为原始名称
42+
Write-Host "Step 2: Tagging image with original name..." -ForegroundColor Blue
43+
docker tag $fullMirrorUrl $ImageTag
44+
45+
# 删除镜像加速器标签
46+
Write-Host "Step 3: Removing mirror tag..." -ForegroundColor Blue
47+
docker rmi $fullMirrorUrl
48+
49+
Write-Host "`nProcess completed successfully!" -ForegroundColor Green
50+
Write-Host "`nCurrent Docker images:" -ForegroundColor Yellow
51+
docker images
52+
53+
} catch {
54+
Write-Host "`nError occurred: $_" -ForegroundColor Red
55+
exit 1
56+
}

docs/latest/changelog/faq.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
## Docker与启动相关问题
66

77
### 镜像拉取/构建失败?
8-
镜像拉取:可使用 `docker/pull_image.sh` 辅助拉取
8+
镜像拉取:可使用以下脚本辅助拉取
9+
- **Linux/macOS**: `docker/pull_image.sh`
10+
- **Windows PowerShell**: `docker/pull_image.ps1`
911
构建失败:若配置了代理仍失败,可尝试以下步骤:
1012
1. 注释 `api.Dockerfile` 中的代理环境变量设置:
1113
```dockerfile

docs/latest/intro/quick-start.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,11 @@ docker logs web-dev -f
9090
如果拉取镜像失败,可以尝试手动拉取:
9191

9292
```bash
93+
# Linux/macOS
9394
bash docker/pull_image.sh python:3.11-slim
95+
96+
# Windows PowerShell
97+
powershell -ExecutionPolicy Bypass -File docker/pull_image.ps1 python:3.11-slim
9498
```
9599

96100
**离线部署方案**

src/config/static/info.template.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,4 @@ actions:
5050

5151
# 页脚信息
5252
footer:
53-
copyright: "© 江南语析 2025 v0.3.0"
53+
copyright: "© 江南语析 2025 v0.4.0"

0 commit comments

Comments
 (0)