commit
build / build-push (push) Successful in 47s

This commit is contained in:
wanghu
2026-09-30 14:43:18 +08:00
parent 8583574e01
commit 3b3eeb9f87
90 changed files with 8633 additions and 0 deletions
+55
View File
@@ -0,0 +1,55 @@
# Profession 生产配置(线上以 nacos 的 profession.yaml 为准,本文件是 nacos 不可达时的兜底)
# 真正上线请在 Nacos 新建 dataId=profession.yaml、group=OA_APP 的配置覆盖以下项
# (尤其 datasource 的库名/账号、yh.sso.client-host-url)。
server:
port: 8071
servlet:
# 对外经 caddy 暴露为 http://base.yunhaixingtong.com/profession
context-path: /profession
spring:
mvc:
date-format: yyyy-MM-dd HH:mm:ss
jackson:
time-zone: GMT+8
date-format: yyyy-MM-dd HH:mm:ss
datasource:
# 与 UserBase 共用同一台 mysql8;库名为 bsch_profession(需先在 mysql8 上建库)
# ⚠️ 建库必须显式指定字符集,否则表继承 MySQL 默认值,中文写入报 SQL 1366:
# CREATE DATABASE bsch_profession DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
url: jdbc:mysql://mysql8:3306/bsch_profession?useUnicode=true&characterEncoding=utf-8&connectionCollation=utf8mb4_general_ci&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true
username: root
password: 'CVf^x$sW*b6CGHxh'
driver-class-name: com.mysql.cj.jdbc.Driver
min-idle: 10
max-active: 30
jpa:
database: MySQL
show-sql: false
hibernate:
ddl-auto: update
# MySQL8Dialect 建表会带 DEFAULT CHARSET=utf8mb4(MySQL5InnoDBDialect 不会)
database-platform: org.hibernate.dialect.MySQL8Dialect
properties:
hibernate.order_by.default_null_ordering: last
open-in-view: true
# 单点登录 / 应用间签名鉴权(基础平台 yh-auth / yh-app-auth)
yh:
sso:
server-url-prefix: http://sso.yunhaixingtong.com
client-host-url: http://base.yunhaixingtong.com/profession
allow-headers: all
allow-origins: all
url-pattern: /api/*
app-auth:
enabled: true
# 本应用自身身份(客户端签名用)
app-key: 100617
app-secret: 2a3b4c5d6e7f8091a2b3c4d5e6f70819
# 受信应用(服务端验签用):appKey -> appSecret
trusted-apps:
100617: 2a3b4c5d6e7f8091a2b3c4d5e6f70819
# 上传文件落容器卷,compose 里挂到宿主机 ./upload-data
FILE_PATH: /data/upload
+9
View File
@@ -0,0 +1,9 @@
#!/bin/sh
# Profession 启动入口:配置统一由 Nacos 配置中心在 bootstrap 阶段下发(见 bootstrap.yml)
# 不再需要手动 curl 拉取;若 nacos 不可达,bootstrap 中 fail-fast=false 会自动回退到
# 镜像内烤好的 application-prod.yml 兜底默认。
set -e
echo "[run-app] starting Profession (profile=prod, nacos=${NACOS_ADDR:-nacos.yunhaixingtong.com:8848}) ..."
exec java ${JAVA_OPTS:--Xms512m -Xmx1024m} -Dfile.encoding=UTF-8 -jar /app/app.jar \
--spring.profiles.active=prod