迁移服务器;分开开发端与生产端;去除废弃接口;对象存储、Kong网关使用SSL;修改所有使用内网地址的代码;切换域名;更新Ktor、ws-scrcpy启动服务;修改Prometheus配置;

This commit is contained in:
BBIT-Kai
2025-10-28 16:33:54 +08:00
parent 08eb2d84eb
commit 2e0a2633bc
23 changed files with 153 additions and 119 deletions
-2
View File
@@ -1,3 +1 @@
SERVER_PATH_OSS = "s1.ronsunny.cn"
F8_SERVER_USER_ID = "da33efb9-776a-443b-b1ec-dbbbf08793d7"
+10 -11
View File
@@ -1,7 +1,8 @@
from langchain_milvus import BM25BuiltInFunction, Milvus
from langchain_milvus import Milvus
from config.llm import llmEmbeddings
URI = "http://10.10.10.9:19530"
URI = "http://ce_milvus:19530"
knVectorstore = Milvus(
embedding_function=llmEmbeddings,
@@ -10,12 +11,11 @@ knVectorstore = Milvus(
index_params={"index_type": "FLAT", "metric_type": "L2"},
consistency_level="Strong",
auto_id=True,
primary_field = "id",
primary_field="id",
text_field="text",
vector_field="vector",
partition_key_field = "kn_id",
enable_dynamic_field = True,
partition_key_field="kn_id",
enable_dynamic_field=True,
drop_old=False, # set to True if seeking to drop the collection with that name if it exists
)
memVectorstore = Milvus(
@@ -25,11 +25,10 @@ memVectorstore = Milvus(
index_params={"index_type": "FLAT", "metric_type": "L2"},
consistency_level="Strong",
auto_id=True,
primary_field = "id",
primary_field="id",
text_field="text",
vector_field="vector",
partition_key_field = "ai_id",
enable_dynamic_field = True,
partition_key_field="ai_id",
enable_dynamic_field=True,
drop_old=False, # set to True if seeking to drop the collection with that name if it exists
)
)
+3 -2
View File
@@ -4,10 +4,11 @@ from minio import Minio
# MinIO 客户端初始化
minio_client = Minio(
"s1.ronsunny.cn:9000",
"ai.ronsunny.cn:9000",
access_key="minioadmin",
secret_key="minioadmin",
secure=False,
region="Chengdu",
secure=True,
)
+6 -3
View File
@@ -1,13 +1,14 @@
import logging
import time
from contextlib import contextmanager
from typing import Optional
import psycopg
from psycopg_pool import ConnectionPool
logger = logging.getLogger("PGPool")
logger.setLevel(logging.INFO)
class PGPool:
"""
PostgreSQL 连接池封装
@@ -62,8 +63,10 @@ class PGPool:
logger.error(f"SQL执行异常: {e}")
raise
raise psycopg.OperationalError("无法获取数据库连接,多次重试失败")
pg_pool = PGPool(
uri="postgresql://postgres:123456@10.10.10.9/ktor2",
uri="postgresql://postgres:123456@ce_postgres/ktor2",
min_size=1,
max_size=20,
)
)
+1 -1
View File
@@ -1,4 +1,4 @@
RABBIT_HOST = "10.10.10.9"
RABBIT_HOST = "ce_rabbitmq"
RABBIT_VHOST = "/bbit_ai"
RABBIT_USER = "bbit_ai"
RABBIT_PASSWORD = "123456"