Skip to content

RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.

Make kvrocks host configurable (#19916)

Wang Qi6a29cf9547a4
diff --git a/conf/service_conf.yaml b/conf/service_conf.yaml
index 6c34076f1a..ed4e86360c 100644
--- a/conf/service_conf.yaml
+++ b/conf/service_conf.yaml
@@ -56,6 +56,11 @@ redis:
username: ''
password: 'infini_rag_flow'
host: 'localhost:6379'
+kvrocks:
+ db: 1
+ username: ''
+ password: 'infini_rag_flow'
+ host: 'localhost:6379'
nats:
host: "localhost"
port: 4222
diff --git a/docker/.env b/docker/.env
index df50b04b74..32fd1bf262 100644
--- a/docker/.env
+++ b/docker/.env
@@ -199,6 +199,7 @@ REDIS_PORT=6379
REDIS_PASSWORD=infini_rag_flow
# Host port that maps to the Kvrocks container port 6379. The Go deployment
# disables the Valkey/Redis service, so Kvrocks reuses the conventional 6379.
+KVROCKS_HOST=kvrocks
KVROCKS_PORT=6379
NATS_HOST=nats
diff --git a/docker/.env-go b/docker/.env-go
index 9ad1050bb9..c03488a511 100644
--- a/docker/.env-go
+++ b/docker/.env-go
@@ -198,7 +198,7 @@ MINIO_PASSWORD=infini_rag_flow
# The hostname where the Kvrocks service is exposed. Kvrocks is the only
# cache/queue backend the Go services use (Redis-protocol, RocksDB-backed).
# For a host-run Go binary, point this at the published Kvrocks port on localhost.
-KVROCKS_HOST=127.0.0.1
+KVROCKS_HOST=kvrocks
# The host port that maps to the Kvrocks container port 6379. The Go deployment
# disables the Valkey/Redis service, so Kvrocks reuses the conventional 6379.
KVROCKS_PORT=6379
diff --git a/internal/server/config/cache_engine_config.go b/internal/server/config/cache_engine_config.go
index 1ce17484e2..a85348c77e 100644
--- a/internal/server/config/cache_engine_config.go
+++ b/internal/server/config/cache_engine_config.go
@@ -58,7 +58,7 @@ func (c *Config) ParseCacheEngineConfig(v *viper.Viper) error {
func (c *Config) parseKvrocksConfig(v *viper.Viper) error {
// Sensible defaults; deployed values come from the `kvrocks` section.
- c.cacheEngine.Kvrocks.Host = "localhost"
+ c.cacheEngine.Kvrocks.Host = "kvrocks"
c.cacheEngine.Kvrocks.Port = 6379
c.cacheEngine.Kvrocks.DB = 1
c.cacheEngine.Kvrocks.Username = ""