Files
senmesh-zc/deployment/iw/config/application.yml
KodouWZF d39b3b035d feat(部署): 新增 deployment/ 内外网两套按侧部署包
按 demo/ 的写法把交付包改成「角色由目录决定」:iw/ 拷内网机、ow/ 拷外网机,
各自含镜像 tar、SQL、配置与 install.sh,install.sh 不再收 iw/ow 参数。

前端不再打进镜像,改为静态包放在 <侧>/web/ 只读挂进 nginx:1.27-alpine,
现场临时改页面直接替换文件 + restart web 即可。数据仍全部挂宿主机,
子目录命名与 deploy/offline 一致(pgdata/redis/mq/upload/logs/gate),
默认根改为包内 ./volumes,放数据盘只改 .env 的 SFILE_DATA_ROOT。

后端镜像 sfile-app:1.0.1 含传输优化那一批(实测组包 11.4×、解包 9.9×)。
出包脚本 deployment/scripts/build-package.sh 负责 jar→镜像→前端双包→sql→tar→VERSION。
2026-11-04 21:44:56 +08:00

111 lines
3.6 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# =============================================================================
# s-file 客户侧静态默认配置(两台机器共用同一份,现场一般不用改)
#
# 随角色/环境变化的取值一律由 docker-compose 的环境变量注入,本文件不放:
# 数据库/Redis/MQ 地址与口令、JWT 密钥、用户初始密码、传输方向与摆渡目录、
# MeshSafe 开关与凭证、MQ 交换机命名 —— 全部在 .env 里填
# 这样交付物里不存在任何写死的口令或密钥
# =============================================================================
server:
port: 8080
spring:
application:
name: s-file
datasource:
driver-class-name: org.postgresql.Driver
type: com.alibaba.druid.pool.DruidDataSource
druid:
initial-size: 5
min-idle: 5
max-active: 50
validation-query: SELECT 1
test-while-idle: true
# 摆渡解包/送检会在多任务里并发取连接,压太低会出现等待
max-wait: 10000
redis:
timeout: 5000
lettuce:
pool:
max-active: 16
max-idle: 8
servlet:
multipart:
max-file-size: 500MB
max-request-size: 500MB
main:
allow-bean-definition-overriding: true
mybatis-plus:
mapper-locations: classpath*:com/senmesh/**/mapper/*.xml
# 平台编码,需与 sql/02-init-data.sql 里 uc_platform.platform_code 一致
system:
code: 1
security:
jwt:
enable: true
# secret 由环境变量 SECURITY_JWT_SECRET 注入,勿在此填写
expiration: 86400000
header: Authorization
ignoring: /error,/favicon.ico
login-page: /login
superior-only: false
# 单机自闭环部署:权限走本地库,不接外部用户中心
use-local: true
allow-if-all-abstain-decisions: true
oauth2:
enable: false
not-logs: ""
anonymous: ""
# 新用户初始密码由环境变量 USER_DEFAULT_PASSWORD 注入
user:
default:
password: ${USER_DEFAULT_PASSWORD:}
file:
upload-dir: /data/upload
storage:
type: local
transfer:
# location / send-dir / receive-dir / monitor.cron 均由环境变量注入
# 解包时是否再做一次内容风险识别(依赖下面的 dify,未部署 dify 时保持 false)
unpack-risk-check: false
monitor:
# 单轮处理时间预算(秒)。超预算即结束本轮,剩余留给下一轮。
# 与监听周期配套:周期 5 秒则预算留 4 秒,保证两轮不互相挤压。
# 目录持续积压(日志「目录剩余待处理」超过 50)时调大此值
round-budget-seconds: 4
# 单轮兜底个数上限,防止极端场景单轮过长
round-max-files: 500
# 包内单个文件大小上限(MB)。解包时整个文件读进堆,峰值约 2-3 倍文件大小,
# 超限直接标 .error 而不是解包到 OOM。按 APP_JAVA_OPTS 的 -Xmx 调整:-Xmx3g 对应 512
max-unpack-size-mb: 512
# 校验不通过或解包异常,且文件静止超过该秒数即判定为坏包,标 .error 停止重试。
# 用于区分「光闸还在搬」与「搬完了但是坏包」,必须大于光闸搬运单个包的最长时间
stale-after-seconds: 300
# 内容风险识别(Dify)。未部署 Dify 时留空并保持 file.transfer.unpack-risk-check=false
dify:
risk:
rule:
api-key: ""
scan:
api-key: ""
# MeshSafe 全段由环境变量注入(MESHSAFE_*),未部署时 MESHSAFE_ENABLED=false 即可,
# 前端会自动隐藏「安全检测」列,跨网摆渡不受影响
meshsafe:
review-sync-to-meshsafe: true
# 接口文档在生产关闭
swagger:
enable: false
logging:
level:
com.senmesh: info