|
|
@@ -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, '/');
|
|
|
}
|
|
|
|