kgrag/kgrag_migration/migration_config.py
2026-07-29 18:10:19 +08:00

43 lines
2.4 KiB
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# =============================================================================
# kgrag 迁移统一配置文件Python 版)
# 所有 Python 脚本从这里读取配置,只需修改此文件
# =============================================================================
# ───────────────────────────────────────────────
# 原数据机(源服务器)
# ───────────────────────────────────────────────
SRC_HOST = "192.168.0.164"
SRC_KGRAG_PORT = 9085
SRC_NEO4J_PORT = 7687
# ───────────────────────────────────────────────
# 迁移目标机(新服务器)
# ───────────────────────────────────────────────
DST_HOST = "192.168.1.108"
DST_KGRAG_PORT = 9085
DST_NEO4J_PORT = 7687
# ───────────────────────────────────────────────
# Neo4j 连接(目标机本地)
# ───────────────────────────────────────────────
NEO4J_URI = f"bolt://neo4j:{DST_NEO4J_PORT}"
NEO4J_USER = "neo4j"
NEO4J_PASSWORD = "zdht123@"
# ───────────────────────────────────────────────
# 目标机部署目录
# ───────────────────────────────────────────────
# kgrag 代码目录(容器挂载的宿主机路径,对应容器内 /app
DST_CODE_DIR = "/app"
# 文件目录(原始文档+高亮PDF对应容器内 /app/files 的挂载路径)
# 若与代码目录相同,填 DST_CODE_DIR + "/files"
DST_FILES_DIR = "/app/files"
# =============================================================================
# 以下为派生变量,无需修改
# =============================================================================
OLD_BASE_URL = f"http://{SRC_HOST}:{SRC_KGRAG_PORT}"
NEW_BASE_URL = f"http://{DST_HOST}:{DST_KGRAG_PORT}"
OLD_IP = SRC_HOST