Open-source LLM knowledge platform: turn raw documents into a queryable RAG, an autonomous reasoning agent, and a self-maintaining Wiki.
Go agentagenticaichatbotdsh-pluginembeddingsevaluationgenerative-aigolangknowledge-basellmmulti-tenantollamaopenaiquestion-answeringragrerankingsemantic-searchvector-searchwiki
feat: update docker image on restart
wizardchen277607b92f2e
diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.ymlindex eb25d5281..cbf2cd28b 100644--- a/.github/ISSUE_TEMPLATE/bug_report.yml+++ b/.github/ISSUE_TEMPLATE/bug_report.yml@@ -32,19 +32,6 @@ body:validations:required: true- - type: textarea- id: steps- attributes:- label: 重现步骤- description: 重现此 bug 的步骤- placeholder: |- 1. 进入 '...'- 2. 点击 '...'- 3. 滚动到 '...'- 4. 看到错误- validations:- required: true-- type: textareaid: expectedattributes:@@ -54,14 +41,6 @@ body:validations:required: true- - type: textarea- id: actual- attributes:- label: 实际行为- description: 描述实际发生的情况- placeholder: "实际发生了什么..."- validations:- required: true- type: markdownattributes:@@ -109,6 +88,4 @@ body:description: 请确认以下事项options:- label: 我已经搜索了现有的 issues,确认这是一个新问题- required: true- - label: 我已经提供了足够的信息来重现这个问题required: true\ No newline at end of filediff --git a/scripts/start_all.sh b/scripts/start_all.shindex 070ce12e0..f2ec41083 100755--- a/scripts/start_all.sh+++ b/scripts/start_all.sh@@ -29,6 +29,7 @@ show_help() {echo " -c, --check 检查环境并诊断问题"echo " -r, --restart 重新构建并重启指定容器"echo " -l, --list 列出所有正在运行的容器"+ echo " -p, --pull 拉取最新的Docker镜像"echo " -v, --version 显示版本信息"exit 0}@@ -332,8 +333,8 @@ start_docker() {# 启动基本服务log_info "启动核心服务容器..."- # 统一通过已检测到的 Compose 命令启动- PLATFORM=$PLATFORM "$DOCKER_COMPOSE_BIN" $DOCKER_COMPOSE_SUBCMD up --build -d+ # 统一通过已检测到的 Compose 命令启动,添加 --pull always 确保使用最新镜像+ PLATFORM=$PLATFORM "$DOCKER_COMPOSE_BIN" $DOCKER_COMPOSE_SUBCMD up --build --pull always -dif [ $? -ne 0 ]; thenlog_error "Docker容器启动失败"return 1@@ -393,6 +394,45 @@ list_containers() {return 0}+# 拉取最新的Docker镜像+pull_images() {+ log_info "正在拉取最新的Docker镜像..."++ # 检查Docker环境+ check_docker+ if [ $? -ne 0 ]; then+ return 1+ fi++ # 检查.env文件+ check_env_file++ # 读取.env文件+ source "$PROJECT_ROOT/.env"+ storage_type=${STORAGE_TYPE:-local}++ check_platform++ # 进入项目根目录再执行docker-compose命令+ cd "$PROJECT_ROOT"++ # 拉取所有镜像+ log_info "拉取所有服务的最新镜像..."+ PLATFORM=$PLATFORM "$DOCKER_COMPOSE_BIN" $DOCKER_COMPOSE_SUBCMD pull+ if [ $? -ne 0 ]; then+ log_error "镜像拉取失败"+ return 1+ fi++ log_success "所有镜像已成功拉取到最新版本"++ # 显示拉取的镜像信息+ log_info "已拉取的镜像:"+ docker images --format "table {{.Repository}}\t{{.Tag}}\t{{.CreatedAt}}\t{{.Size}}" | head -10++ return 0+}+# 重启指定容器restart_container() {local container_name="$1"@@ -523,6 +563,7 @@ STOP_SERVICES=falseCHECK_ENVIRONMENT=falseLIST_CONTAINERS=falseRESTART_CONTAINER=false+PULL_IMAGES=falseCONTAINER_NAME=""# 没有参数时默认启动所有服务@@ -548,6 +589,8 @@ while [ "$1" != "" ]; do;;-l | --list ) LIST_CONTAINERS=true;;+ -p | --pull ) PULL_IMAGES=true+ ;;-r | --restart ) RESTART_CONTAINER=trueCONTAINER_NAME="$2"shift@@ -573,6 +616,12 @@ if [ "$LIST_CONTAINERS" = true ]; thenexit $?fi+# 拉取最新镜像+if [ "$PULL_IMAGES" = true ]; then+ pull_images+ exit $?+fi+# 重启指定容器if [ "$RESTART_CONTAINER" = true ]; thenrestart_container "$CONTAINER_NAME"