File tree Expand file tree Collapse file tree 6 files changed +68
-7
lines changed
Expand file tree Collapse file tree 6 files changed +68
-7
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,8 @@ SAVE_DIR=./saves
44# region model_provider
55# 推荐使用硅基流动免费服务
66SILICONFLOW_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
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change 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 " `n Process completed successfully!" - ForegroundColor Green
50+ Write-Host " `n Current Docker images:" - ForegroundColor Yellow
51+ docker images
52+
53+ } catch {
54+ Write-Host " `n Error occurred: $_ " - ForegroundColor Red
55+ exit 1
56+ }
Original file line number Diff line number Diff line change 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构建失败:若配置了代理仍失败,可尝试以下步骤:
10121 . 注释 ` api.Dockerfile ` 中的代理环境变量设置:
1113 ``` dockerfile
Original file line number Diff line number Diff line change @@ -90,7 +90,11 @@ docker logs web-dev -f
9090如果拉取镜像失败,可以尝试手动拉取:
9191
9292``` bash
93+ # Linux/macOS
9394bash 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** 离线部署方案** :
Original file line number Diff line number Diff line change @@ -50,4 +50,4 @@ actions:
5050
5151# 页脚信息
5252footer :
53- copyright : " © 江南语析 2025 v0.3 .0"
53+ copyright : " © 江南语析 2025 v0.4 .0"
You can’t perform that action at this time.
0 commit comments