From d353d331077771d4a81a374259943f7a1ed50776 Mon Sep 17 00:00:00 2001 From: kuaifan Date: Thu, 6 Mar 2025 17:11:32 +0800 Subject: [PATCH] no message --- app/Module/ElasticSearch.php | 2 +- cmd | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/Module/ElasticSearch.php b/app/Module/ElasticSearch.php index 66166d627..4ebe7f199 100644 --- a/app/Module/ElasticSearch.php +++ b/app/Module/ElasticSearch.php @@ -52,7 +52,7 @@ class ElasticSearch $this->client = ClientBuilder::fromConfig($config); if ($index) { - $this->index = $index; + $this->index = $index . env("ES_INDEX_SUFFIX", ""); } } diff --git a/cmd b/cmd index 5225fefbc..70f506eb5 100755 --- a/cmd +++ b/cmd @@ -440,6 +440,8 @@ if [ $# -gt 0 ]; then exit 1 fi done + # 设置ES索引后缀 + env_set ES_INDEX_SUFFIX "$(rand_string 6)" # 启动容器 [[ "$(arg_get port)" -gt 0 ]] && env_set APP_PORT "$(arg_get port)" $COMPOSE up php -d