[运维] 接入内网 searxng + 清理启动脚本 + 修 log-trim 权限

搜索接口:

- duckduckgo_search.py / ZhipuSearchAPI.py 切换到内网 searxng (原 43.251.225.121 / 134.122.191.214 已失效)

启动脚本清理:

- 删除废弃 backend/ 目录 (与 chat_web_backend/ 编译产物 jar MD5 相同,仅是改名副本)

- 删除 start_all.sh 与 langchain-chat/{start,stop,stop_quick,shutdown_all,restart}.sh (被 scripts/*-restart.sh 覆盖)

- 删除 chat_web_backend/{start,test_mysql}.sh

修复:

- scripts/backend-restart.sh 对齐当前实际在跑的 chat_web_backend.jar (profile=dev)

- scripts/log-trim-daemon.sh 把 LOCK 移到 /tmp 按用户命名,修复非首次用户跑时的 Permission denied

新增:

- scripts/start-all.sh:一键启动入口,串联 mysql/redis/milvus/langchain/backend/frontend,含端口自检

- chat_web_backend/application-local.yml.archived:原 backend/ 下 yj profile 覆盖配置的归档备份

其他:

- .gitignore 忽略 scripts/pptist-deploy/PPTist/ (323M 第三方源码树)
This commit is contained in:
2026-04-20 15:59:11 +08:00
parent 279b104434
commit 0c3a393d04
18 changed files with 222 additions and 585 deletions

View File

@@ -0,0 +1,56 @@
# 原始位置:/opt/download/oss_files/gangyan-deploy/gangyan/backend/application-local.yml
# 归档时间2026-04-20
# 用途yj profile 的本地覆盖mysql 33306 Docker 映射),启动时通过 -Dspring.config.additional-location 叠加
# 覆盖 jar 内过期的 application-yj.yml当前 jar 仍含远程库 123.57.146.97,不配本会长时间卡 Druid
# 完整 spring.redis + spring.datasource 与源码 application-yj.yml 对齐(本地 Docker 33306
logging:
file:
name: ${user.home}/.gangyan/logs/spring.log
spring:
redis:
open: true
database: 0
host: 127.0.0.1
port: 6379
password: ""
timeout: 6000
lettuce:
pool:
max-active: 1000
max-wait: -1
max-idle: 10
min-idle: 5
datasource:
type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://127.0.0.1:33306/chat_gpt_yj?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true&serverTimezone=GMT%2B8
username: root
password: "1234567890"
druid:
initialSize: 5
minIdle: 10
maxActive: 20
maxWait: 60000
timeBetweenEvictionRunsMillis: 60000
minEvictableIdleTimeMillis: 300000
maxEvictableIdleTimeMillis: 900000
validationQuery: SELECT 1 FROM DUAL
testWhileIdle: true
testOnBorrow: true
testOnReturn: false
keepAlive: true
phyTimeoutMillis: 600000
connectTimeout: 60000
poolPreparedStatements: true
filters: stat,wall,slf4j,config
useGlobalDataSourceStat: true
stat:
log-slow-sql: true
merge-sql: true
slow-sql-millis: 10000
chat:
modelName: deepseek-v3

View File

@@ -1,25 +0,0 @@
#!/bin/bash
# Java后端启动脚本
# 使用 Java 11 运行(兼容性更好)
export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64
export PATH=$JAVA_HOME/bin:$PATH
cd "$(dirname "$0")"
echo "=========================================="
echo "启动 Chat Web Backend"
echo "=========================================="
echo ""
echo "Java版本:"
java -version
echo ""
echo "启动端口: 8099"
echo "访问地址: http://localhost:8099/chat_web_backend"
echo ""
echo "按 Ctrl+C 停止服务"
echo "=========================================="
echo ""
# 启动应用
nohup java -jar target/chat_web_backend.jar --spring.profiles.active=dev > ./nohup.out 2>&1 &

View File

@@ -1,4 +0,0 @@
#!/bin/bash
echo "测试MySQL连接..."
echo "密码: 1234567890"
mysql -uroot -p1234567890 -h127.0.0.1 -e "SHOW DATABASES;" 2>&1 | head -20