mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-02-02 00:25:06 +08:00
feat: add seekdb which is lite version of oceanbase (#12692)
### What problem does this PR solve? Add seekdb as doc_engine wich is the lite version of oceanbase. close #12691 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@ -56,6 +56,9 @@ docker/data
|
|||||||
docker/oceanbase/conf
|
docker/oceanbase/conf
|
||||||
docker/oceanbase/data
|
docker/oceanbase/data
|
||||||
|
|
||||||
|
# SeekDB data and conf
|
||||||
|
docker/seekdb
|
||||||
|
|
||||||
|
|
||||||
#--------------------------------------------------#
|
#--------------------------------------------------#
|
||||||
# The following was generated with gitignore.nvim: #
|
# The following was generated with gitignore.nvim: #
|
||||||
|
|||||||
@ -257,6 +257,9 @@ def init_settings():
|
|||||||
elif lower_case_doc_engine == "oceanbase":
|
elif lower_case_doc_engine == "oceanbase":
|
||||||
OB = get_base_config("oceanbase", {})
|
OB = get_base_config("oceanbase", {})
|
||||||
docStoreConn = rag.utils.ob_conn.OBConnection()
|
docStoreConn = rag.utils.ob_conn.OBConnection()
|
||||||
|
elif lower_case_doc_engine == "seekdb":
|
||||||
|
OB = get_base_config("seekdb", {})
|
||||||
|
docStoreConn = rag.utils.ob_conn.OBConnection()
|
||||||
else:
|
else:
|
||||||
raise Exception(f"Not supported doc engine: {DOC_ENGINE}")
|
raise Exception(f"Not supported doc engine: {DOC_ENGINE}")
|
||||||
|
|
||||||
|
|||||||
14
docker/.env
14
docker/.env
@ -16,6 +16,7 @@
|
|||||||
# - `infinity` (https://github.com/infiniflow/infinity)
|
# - `infinity` (https://github.com/infiniflow/infinity)
|
||||||
# - `oceanbase` (https://github.com/oceanbase/oceanbase)
|
# - `oceanbase` (https://github.com/oceanbase/oceanbase)
|
||||||
# - `opensearch` (https://github.com/opensearch-project/OpenSearch)
|
# - `opensearch` (https://github.com/opensearch-project/OpenSearch)
|
||||||
|
# - `seekdb` (https://github.com/oceanbase/seekdb)
|
||||||
DOC_ENGINE=${DOC_ENGINE:-elasticsearch}
|
DOC_ENGINE=${DOC_ENGINE:-elasticsearch}
|
||||||
|
|
||||||
# Device on which deepdoc inference run.
|
# Device on which deepdoc inference run.
|
||||||
@ -92,6 +93,19 @@ OB_SYSTEM_MEMORY=${OB_SYSTEM_MEMORY:-2G}
|
|||||||
OB_DATAFILE_SIZE=${OB_DATAFILE_SIZE:-20G}
|
OB_DATAFILE_SIZE=${OB_DATAFILE_SIZE:-20G}
|
||||||
OB_LOG_DISK_SIZE=${OB_LOG_DISK_SIZE:-20G}
|
OB_LOG_DISK_SIZE=${OB_LOG_DISK_SIZE:-20G}
|
||||||
|
|
||||||
|
# The hostname where the SeekDB service is exposed
|
||||||
|
SEEKDB_HOST=seekdb
|
||||||
|
# The port used to expose the SeekDB service
|
||||||
|
SEEKDB_PORT=2881
|
||||||
|
# The username for SeekDB
|
||||||
|
SEEKDB_USER=root
|
||||||
|
# The password for SeekDB
|
||||||
|
SEEKDB_PASSWORD=infini_rag_flow
|
||||||
|
# The doc database of the SeekDB service to use
|
||||||
|
SEEKDB_DOC_DBNAME=ragflow_doc
|
||||||
|
# SeekDB memory limit
|
||||||
|
SEEKDB_MEMORY_LIMIT=2G
|
||||||
|
|
||||||
# The password for MySQL.
|
# The password for MySQL.
|
||||||
# WARNING: Change this for production!
|
# WARNING: Change this for production!
|
||||||
MYSQL_PASSWORD=infini_rag_flow
|
MYSQL_PASSWORD=infini_rag_flow
|
||||||
|
|||||||
@ -121,6 +121,30 @@ services:
|
|||||||
- ragflow
|
- ragflow
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
||||||
|
seekdb:
|
||||||
|
profiles:
|
||||||
|
- seekdb
|
||||||
|
image: oceanbase/seekdb:latest
|
||||||
|
container_name: seekdb
|
||||||
|
volumes:
|
||||||
|
- ./seekdb:/var/lib/oceanbase
|
||||||
|
ports:
|
||||||
|
- ${SEEKDB_PORT:-2881}:2881
|
||||||
|
env_file: .env
|
||||||
|
environment:
|
||||||
|
- ROOT_PASSWORD=${SEEKDB_PASSWORD:-infini_rag_flow}
|
||||||
|
- MEMORY_LIMIT=${SEEKDB_MEMORY_LIMIT:-2G}
|
||||||
|
- REPORTER=ragflow-seekdb
|
||||||
|
mem_limit: ${MEM_LIMIT}
|
||||||
|
healthcheck:
|
||||||
|
test: ['CMD-SHELL', 'mysql -h127.0.0.1 -P2881 -uroot -p${SEEKDB_PASSWORD:-infini_rag_flow} -e "CREATE DATABASE IF NOT EXISTS ${SEEKDB_DOC_DBNAME:-ragflow_doc};"']
|
||||||
|
interval: 5s
|
||||||
|
retries: 60
|
||||||
|
timeout: 5s
|
||||||
|
networks:
|
||||||
|
- ragflow
|
||||||
|
restart: unless-stopped
|
||||||
|
|
||||||
sandbox-executor-manager:
|
sandbox-executor-manager:
|
||||||
profiles:
|
profiles:
|
||||||
- sandbox
|
- sandbox
|
||||||
@ -283,6 +307,8 @@ volumes:
|
|||||||
driver: local
|
driver: local
|
||||||
ob_data:
|
ob_data:
|
||||||
driver: local
|
driver: local
|
||||||
|
seekdb_data:
|
||||||
|
driver: local
|
||||||
mysql_data:
|
mysql_data:
|
||||||
driver: local
|
driver: local
|
||||||
minio_data:
|
minio_data:
|
||||||
|
|||||||
@ -38,6 +38,14 @@ oceanbase:
|
|||||||
password: '${OCEANBASE_PASSWORD:-infini_rag_flow}'
|
password: '${OCEANBASE_PASSWORD:-infini_rag_flow}'
|
||||||
host: '${OCEANBASE_HOST:-oceanbase}'
|
host: '${OCEANBASE_HOST:-oceanbase}'
|
||||||
port: ${OCEANBASE_PORT:-2881}
|
port: ${OCEANBASE_PORT:-2881}
|
||||||
|
seekdb:
|
||||||
|
scheme: 'oceanbase' # SeekDB is the lite version of OceanBase
|
||||||
|
config:
|
||||||
|
db_name: '${SEEKDB_DOC_DBNAME:-ragflow_doc}'
|
||||||
|
user: '${SEEKDB_USER:-root}'
|
||||||
|
password: '${SEEKDB_PASSWORD:-infini_rag_flow}'
|
||||||
|
host: '${SEEKDB_HOST:-seekdb}'
|
||||||
|
port: ${SEEKDB_PORT:-2881}
|
||||||
redis:
|
redis:
|
||||||
db: 1
|
db: 1
|
||||||
username: '${REDIS_USERNAME:-}'
|
username: '${REDIS_USERNAME:-}'
|
||||||
|
|||||||
Reference in New Issue
Block a user