diff --git a/.env.prod b/.env.prod index 5aa584e..885c301 100644 --- a/.env.prod +++ b/.env.prod @@ -1,87 +1,58 @@ # -------- 应用配置 -------- # 应用运行环境 -APP_ENV = 'prod' +APP_ENV='dev' # 应用名称 -APP_NAME = '电网智能巡航系统' +APP_NAME='规则生成系统' # 应用代理路径 -# APP_ROOT_PATH = '/cruise' -APP_ROOT_PATH = '' +# APP_ROOT_PATH = '/rule' +APP_ROOT_PATH='' # 应用主机 -APP_HOST = '0.0.0.0' +APP_HOST='0.0.0.0' # 应用端口 -APP_PORT = 9099 +APP_PORT=9099 # 应用版本 -APP_VERSION= '1.6.1' +APP_VERSION='1.0.0' # 应用是否开启热重载 -APP_RELOAD = true +APP_RELOAD=true # 应用是否开启IP归属区域查询 -APP_IP_LOCATION_QUERY = true +APP_IP_LOCATION_QUERY=true # 应用是否允许账号同时登录 -APP_SAME_TIME_LOGIN = true +APP_SAME_TIME_LOGIN=true # 是否允许接口直接执行sql进行测试 -APP_TSET_SQL = true +APP_TSET_SQL=false -# -------- Jwt配置 -------- -# Jwt秘钥 -JWT_SECRET_KEY = 'b01c66dc2c58dc6a0aabfe2144256be36226de378bf87f72c0c795dda67f4d55' -# Jwt算法 -JWT_ALGORITHM = 'HS256' -# 令牌过期时间 -JWT_EXPIRE_MINUTES = 1440 -# redis中令牌过期时间 -JWT_REDIS_EXPIRE_MINUTES = 300 - - -# -------- 数据库1配置 -------- -# 数据库类型,可选的有'mysql'、'postgresql',默认为'mysql' -DB_TYPE = 'mysql' +# -------- mysql数据库配置 -------- # 数据库主机 -DB_HOST = '10.92.176.60' +MYSQL_DB_HOST='ngsk.tech' # 数据库端口 -DB_PORT = 13306 +MYSQL_DB_PORT=33306 # 数据库用户名 -DB_USERNAME = 'root' +MYSQL_DB_USERNAME='root' # 数据库密码 -DB_PASSWORD = 'root' +MYSQL_DB_PASSWORD='ngsk0809cruise' # 数据库名称 -DB_DATABASE = 'cruise' -# 是否开启sqlalchemy日志 -DB_ECHO = true -# 允许溢出连接池大小的最大连接数 -DB_MAX_OVERFLOW = 10 -# 连接池大小,0表示连接数无限制 -DB_POOL_SIZE = 50 -# 连接回收时间(单位:秒) -DB_POOL_RECYCLE = 3600 -# 连接池中没有线程可用时,最多等待的时间(单位:秒) -DB_POOL_TIMEOUT = 30 +MYSQL_DB_DATABASE='data_governance' -# -------- 数据库2配置 -------- -DB2_TYPE = 'mysql' + +# -------- pgvector数据库配置 -------- # 数据库主机 -DB2_HOST = '10.92.176.60' +PG_DB_HOST='192.168.5.30' # 数据库端口 -DB2_PORT = 13306 +PG_DB_PORT=5432 # 数据库用户名 -DB2_USERNAME = 'root' +PG_DB_USERNAME='myuser' # 数据库密码 -DB2_PASSWORD = 'root' +PG_DB_PASSWORD='mypassword' # 数据库名称 -DB2_DATABASE = 'operationrisk' +PG_DB_DATABASE='vectordb' + +# -------- 大语言模型配置 -------- +llm_base_url='http://192.168.5.20:4090/v1' +llm_api_key='gpustack_951f92355e6781a5_5d17650a3e7135c5430512e5117362fb' +llm_model='qwen3-30b-a3b-instruct-2507' -# -------- Redis配置 -------- -# Redis主机 -REDIS_HOST = '10.92.176.60' -# Redis端口 -REDIS_PORT = 16379 -# Redis用户名 -REDIS_USERNAME = '' -# Redis密码 -REDIS_PASSWORD = '' -# Redis数据库 -REDIS_DATABASE = 2 +# -------- 向量模型配置 -------- +emb_base_url='http://192.168.5.20:4090/v1' +emb_api_key='gpustack_951f92355e6781a5_5d17650a3e7135c5430512e5117362fb' +emb_model='bge-m3' -AI_BASE_URL = 'http://192.168.196.140:1025/v1' -AI_API_KEY = 'ollama' -AI_MODEL_NAME = 'deepseek-r1:14b' -AI_DAILY_REPORT_URL = 'http://192.168.196.140:19013/sgd/' \ No newline at end of file diff --git a/.gitignore b/.gitignore index c24e9dd..b966972 100644 --- a/.gitignore +++ b/.gitignore @@ -6,5 +6,6 @@ *.log +*.tar /data_preparation/*.xlsx /data_preparation/*.txt \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 721f4fa..b7fd5e9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,8 @@ # 使用官方 Python 基础镜像 FROM hub.1panel.dev/library/python:3.12-slim +# RUN apt-get update && apt-get install -y gcc && rm -rf /var/lib/apt/lists/* + # 设置工作目录 WORKDIR /app