RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.
Go agent-harnessagent-native-databaseagentic-aiagentic-retrievalagentic-searchaiai-agentscontext-enginecontext-engineeringcontext-managementharness-engineeringknowledge-compilationragretrieval-augmented-generationretrieval-harnesssearch-harness
Expose go version server and admin server port out of docker in CI (#13572)
Jin Hai3fbf8bc3d4bf
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.ymlindex 47d94c212f..eda2ea3f79 100644--- a/.github/workflows/tests.yml+++ b/.github/workflows/tests.yml@@ -185,6 +185,8 @@ jobs:SVR_HTTP_PORT=$((9380 + RUNNER_NUM * 10))ADMIN_SVR_HTTP_PORT=$((9381 + RUNNER_NUM * 10))SVR_MCP_PORT=$((9382 + RUNNER_NUM * 10))+ GO_HTTP_PORT=$((9384 + RUNNER_NUM * 10))+ GO_ADMIN_PORT=$((9385 + RUNNER_NUM * 10))SANDBOX_EXECUTOR_MANAGER_PORT=$((9385 + RUNNER_NUM * 10))SVR_WEB_HTTP_PORT=$((80 + RUNNER_NUM * 10))SVR_WEB_HTTPS_PORT=$((443 + RUNNER_NUM * 10))@@ -205,6 +207,8 @@ jobs:echo -e "SVR_HTTP_PORT=${SVR_HTTP_PORT}" >> docker/.envecho -e "ADMIN_SVR_HTTP_PORT=${ADMIN_SVR_HTTP_PORT}" >> docker/.envecho -e "SVR_MCP_PORT=${SVR_MCP_PORT}" >> docker/.env+ echo -e "GO_HTTP_PORT=${GO_HTTP_PORT}" >> docker/.env+ echo -e "GO_ADMIN_PORT=${GO_ADMIN_PORT}" >> docker/.envecho -e "SANDBOX_EXECUTOR_MANAGER_PORT=${SANDBOX_EXECUTOR_MANAGER_PORT}" >> docker/.envecho -e "SVR_WEB_HTTP_PORT=${SVR_WEB_HTTP_PORT}" >> docker/.envecho -e "SVR_WEB_HTTPS_PORT=${SVR_WEB_HTTPS_PORT}" >> docker/.envdiff --git a/cmd/admin_server.go b/cmd/admin_server.goindex 291f7868ee..fae63a0e88 100644--- a/cmd/admin_server.go+++ b/cmd/admin_server.go@@ -159,7 +159,7 @@ func main() {// Start server in a goroutinego func() {- logger.Info(fmt.Sprintf("Version: %s", utility.GetRAGFlowVersion()))+ logger.Info(fmt.Sprintf("Admin Go Version: %s", utility.GetRAGFlowVersion()))logger.Info(fmt.Sprintf("Starting RAGFlow admin server on port: %d", cfg.Admin.Port))if err := srv.ListenAndServe(); err != nil && err != http.ErrServerClosed {logger.Fatal("Failed to start server", zap.Error(err))diff --git a/cmd/server_main.go b/cmd/server_main.goindex a6eb3408bb..cc2510ec85 100644--- a/cmd/server_main.go+++ b/cmd/server_main.go@@ -216,7 +216,7 @@ func startServer(config *server.Config) {" / _, _// ___ |/ /_/ // __/ / // /_/ /| |/ |/ /\n" +" /_/ |_|/_/ |_|\\____//_/ /_/ \\____/ |__/|__/\n",)- logger.Info(fmt.Sprintf("Version: %s", utility.GetRAGFlowVersion()))+ logger.Info(fmt.Sprintf("RAGFlow Go Version: %s", utility.GetRAGFlowVersion()))logger.Info(fmt.Sprintf("Server starting on port: %d", config.Server.Port))if err := srv.ListenAndServe(); err != nil && err != http.ErrServerClosed {logger.Fatal("Failed to start server", zap.Error(err))diff --git a/docker/.env b/docker/.envindex 79f4f91b34..c7e68a756a 100644--- a/docker/.env+++ b/docker/.env@@ -152,6 +152,8 @@ SVR_WEB_HTTPS_PORT=443SVR_HTTP_PORT=9380ADMIN_SVR_HTTP_PORT=9381SVR_MCP_PORT=9382+GO_HTTP_PORT=9384+GO_ADMIN_PORT=9385# The RAGFlow Docker image to download. v0.22+ doesn't include embedding models.RAGFLOW_IMAGE=infiniflow/ragflow:v0.24.0diff --git a/internal/server/config.go b/internal/server/config.goindex acdcf4c017..111dec213c 100644--- a/internal/server/config.go+++ b/internal/server/config.go@@ -337,9 +337,9 @@ func Init(configPath string) error {globalConfig.Admin.Host = "127.0.0.1"}if globalConfig.Admin.Port == 0 {- globalConfig.Admin.Port = 9383+ globalConfig.Admin.Port = 9385} else {- globalConfig.Admin.Port += 2+ globalConfig.Admin.Port += 4}// Load REGISTER_ENABLED from environment variable (default: 1)@@ -374,7 +374,7 @@ func Init(configPath string) error {if v.IsSet("ragflow") {ragflowConfig := v.Sub("ragflow")if ragflowConfig != nil {- globalConfig.Server.Port = ragflowConfig.GetInt("http_port") + 2 // 9382, by default+ globalConfig.Server.Port = ragflowConfig.GetInt("http_port") + 4 // 9384, by default//globalConfig.Server.Port = ragflowConfig.GetInt("http_port") // Correct// If mode is not set, default to debugif globalConfig.Server.Mode == "" {