build: 增加服务器部署配置(8.134.55.105),dev 改本机模拟上线

- application-gxtyzx-server.yml: 容器内部署用,master 走 db_gxtyzx、server 走生产 core,
  nginx 80 反代对外,关闭 think 定时任务与人脸闸机同步
- application-dev.yml: 认证指向生产 core、发现地址回指本机、上传落 /tmp,便于本机模拟上线
This commit is contained in:
2026-10-31 20:24:01 +08:00
parent c8ff29d864
commit ff3b9073ac
2 changed files with 92 additions and 4 deletions
+15 -4
View File
@@ -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,直接启动即可: # application.yml 已默认激活 dev,直接启动即可:
# sh mvnw spring-boot:run # sh mvnw spring-boot:run
@@ -40,9 +45,15 @@ socketio:
# 框架配置 # 框架配置
config: config:
# 生产环境接口 # 认证服务地址:生产 core(用户/租户/权限校验都打这里)
server-url: https://gxtyzx-server.websoft.top/api auth-server-url: https://gxtyzx-server.websoft.top/api
upload-path: /www/wwwroot/gxtyzx-api/file/ # 发现地址:只用于拼附件/导出文件的 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云存储 # 阿里云OSS云存储
endpoint: https://oss-cn-shenzhen.aliyuncs.com endpoint: https://oss-cn-shenzhen.aliyuncs.com
@@ -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