From ff3b9073ac886a6befbb33743822e3bd509cdab5 Mon Sep 17 00:00:00 2001 From: weicw <594098497@qq.com> Date: Sat, 31 Oct 2026 20:24:01 +0800 Subject: [PATCH] =?UTF-8?q?build:=20=E5=A2=9E=E5=8A=A0=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=E5=99=A8=E9=83=A8=E7=BD=B2=E9=85=8D=E7=BD=AE=EF=BC=888.134.55.?= =?UTF-8?q?105=EF=BC=89=EF=BC=8Cdev=20=E6=94=B9=E6=9C=AC=E6=9C=BA=E6=A8=A1?= =?UTF-8?q?=E6=8B=9F=E4=B8=8A=E7=BA=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - application-gxtyzx-server.yml: 容器内部署用,master 走 db_gxtyzx、server 走生产 core, nginx 80 反代对外,关闭 think 定时任务与人脸闸机同步 - application-dev.yml: 认证指向生产 core、发现地址回指本机、上传落 /tmp,便于本机模拟上线 --- src/main/resources/application-dev.yml | 19 ++++- .../resources/application-gxtyzx-server.yml | 77 +++++++++++++++++++ 2 files changed, 92 insertions(+), 4 deletions(-) create mode 100644 src/main/resources/application-gxtyzx-server.yml diff --git a/src/main/resources/application-dev.yml b/src/main/resources/application-dev.yml index cb288ca..98d1312 100644 --- a/src/main/resources/application-dev.yml +++ b/src/main/resources/application-dev.yml @@ -1,4 +1,9 @@ -# 测试环境配置(8.134.55.105:13306 / 本地 Redis database 5) +# 本机模拟上线:认证走生产 core,服务仍跑在本机 +# +# - 认证:config.auth-server-url 指向生产 core(gxtyzx-server.websoft.top) +# - server 库:生产 core 库(47.121.133.163:3308/gxwebsoft_core),用户/角色/组织都读这里 +# - master 库:测试库(8.134.55.105:13306/db_gxtyzx),审批业务表在这里 +# - 本机没有 /www,上传目录落 /tmp;发现地址回指本机 9099,保证上传的附件能打开 # # application.yml 已默认激活 dev,直接启动即可: # sh mvnw spring-boot:run @@ -40,9 +45,15 @@ socketio: # 框架配置 config: - # 生产环境接口 - server-url: https://gxtyzx-server.websoft.top/api - upload-path: /www/wwwroot/gxtyzx-api/file/ + # 认证服务地址:生产 core(用户/租户/权限校验都打这里) + auth-server-url: https://gxtyzx-server.websoft.top/api + # 发现地址:只用于拼附件/导出文件的 URL,附件落本机就必须回指本机 + server-url: http://127.0.0.1:9099/api + # 本机模拟:上传落本地可写目录 + upload-path: /tmp/gxtyzx-uploads/ + local-upload-path: /tmp/gxtyzx-uploads/ + file-server: http://127.0.0.1:9099 + open-office-home: /usr/lib/libreoffice # 阿里云OSS云存储 endpoint: https://oss-cn-shenzhen.aliyuncs.com diff --git a/src/main/resources/application-gxtyzx-server.yml b/src/main/resources/application-gxtyzx-server.yml new file mode 100644 index 0000000..a85644b --- /dev/null +++ b/src/main/resources/application-gxtyzx-server.yml @@ -0,0 +1,77 @@ +# 服务器部署配置(8.134.55.105,容器内运行) +# +# - master: db_gxtyzx(审批业务表 approval_* 都在这里) +# - server: 生产 core 库 gxwebsoft_core@47.121.133.163:3308 +# **必须**与 auth-server-url 同一个库:登录 token 里的 userId 来自生产 core, +# 审批的用户/角色/组织若读另一套 core,userId 对不上会全员 403。 +# - 认证:生产 core(gxtyzx-server.websoft.top) +# - 对外:IP + 端口,无域名、无 HTTPS +# +# 容器内通过 docker 网络用容器名解析 mysql / redis。 + +server: + port: 9091 + +spring: + datasource: + dynamic: + primary: master + strict: false + datasource: + master: + url: jdbc:mysql://mysql:3306/db_gxtyzx?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=GMT%2B8 + username: db_gxtyzx + password: ekXdi5iJMjHKaw3K + driver-class-name: com.mysql.cj.jdbc.Driver + type: com.alibaba.druid.pool.DruidDataSource + server: + url: jdbc:mysql://47.121.133.163:3308/gxwebsoft_core?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=GMT%2B8&rewriteBatchedStatements=true + username: gxwebsoft_core + password: jdj7HYEdYHnYEFBy + driver-class-name: com.mysql.cj.jdbc.Driver + type: com.alibaba.druid.pool.DruidDataSource + redis: + database: 0 + host: redis + port: 6379 + password: redis_t74P8C + +# 日志配置 +logging: + file: + name: /app/logs/gxtyzx-server.log + level: + root: WARN + com.gxwebsoft: INFO + com.baomidou.mybatisplus: WARN + +socketio: + host: 0.0.0.0 + +# 框架配置 +config: + # 认证服务:生产 core(登录/用户/租户校验) + auth-server-url: https://gxtyzx-server.websoft.top/api + # 对外访问地址(拼附件/导出文件 URL 用,含 /api) + # 必须走 nginx 80 反代:9091 被 ufw 拦住,外部打不开 + server-url: http://8.134.55.105/api + # 文件服务对外地址(FileController 会再拼 /api/file,所以这里不带 /api) + file-server: http://8.134.55.105 + # 上传目录:容器内路径,宿主机挂载持久化 + upload-path: /www/wwwroot/gxtyzx-api/file/ + local-upload-path: /www/wwwroot/gxtyzx-api/file/ + # 容器内无 libreoffice,Office 附件预览会降级(不阻断其他功能) + open-office-home: "" + + # 阿里云OSS云存储 + endpoint: https://oss-cn-shenzhen.aliyuncs.com + accessKeyId: LTAI4GKGZ9Z2Z8JZ77c3GNZP + accessKeySecret: BiDkpS7UXj72HWwDWaFZxiXjNFBNCM + bucketName: oss-gxwebsoft + bucketDomain: https://oss.wsdns.cn + aliyunDomain: https://oss-gxwebsoft.oss-cn-shenzhen.aliyuncs.com + + # 关闭旧 ThinkPHP 定时任务:会按秒轮询并回写 think_* 订单,生产环境不由本服务承担 + think-scheduling-enabled: false + # 关闭人脸闸机同步:闸机服务在生产内网,本机不可达 + think-face-access-enabled: false