소스 검색

增加添加题目的功能

yemeishu 1 개월 전
부모
커밋
87358a968a
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      app/Services/KnowledgeGraphService.php

+ 2 - 2
app/Services/KnowledgeGraphService.php

@@ -11,8 +11,8 @@ class KnowledgeGraphService
 
     public function __construct()
     {
-        // 从配置文件读取base_url,而不是写死
-        $this->baseUrl = config('services.knowledge_api.base_url', env('KNOWLEDGE_API_BASE', 'http://localhost:5011'));
+        // 从配置文件读取base_url,如果没有配置则使用容器服务名
+        $this->baseUrl = config('services.knowledge_api.base_url', env('KNOWLEDGE_API_BASE', env('KNOWLEDGE_API_BASE_URL', 'http://api-knowledge:5011')));
         $this->baseUrl = rtrim($this->baseUrl, '/');
     }