anxin-ruoyi/docker/configs/application-docker.yml
2026-01-08 20:47:24 +08:00

211 lines
5.7 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.

# Docker环境专用配置文件
# 用于覆盖默认配置适配Docker容器环境
server:
port: 8080
servlet:
context-path: /
tomcat:
uri-encoding: UTF-8
accept-count: 1000
threads:
max: 800
min-spare: 100
# 数据源配置
spring:
datasource:
type: com.alibaba.druid.pool.DruidDataSource
driverClassName: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://${DB_HOST:anxin-mysql}:${DB_PORT:3306}/${DB_NAME:anxin_dev}?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8&allowPublicKeyRetrieval=true
username: ${DB_USER:anxin_dev}
password: ${DB_PASSWORD:dev_password}
druid:
# 初始连接数
initialSize: 5
# 最小连接池数量
minIdle: 10
# 最大连接池数量
maxActive: 20
# 配置获取连接等待超时的时间
maxWait: 60000
# 配置连接超时时间
connectTimeout: 30000
# 配置网络超时时间
socketTimeout: 60000
# 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
timeBetweenEvictionRunsMillis: 60000
# 配置一个连接在池中最小生存的时间,单位是毫秒
minEvictableIdleTimeMillis: 300000
# 配置一个连接在池中最大生存的时间,单位是毫秒
maxEvictableIdleTimeMillis: 900000
# 配置检测连接是否有效
validationQuery: SELECT 1 FROM DUAL
testWhileIdle: true
testOnBorrow: false
testOnReturn: false
# 连接池关闭时等待时间
timeBetweenConnectErrorMillis: 30000
# 连接泄漏检测
removeAbandoned: true
removeAbandonedTimeout: 1800
logAbandoned: true
# 防止连接池耗尽
breakAfterAcquireFailure: true
connectionErrorRetryAttempts: 3
webStatFilter:
enabled: true
statViewServlet:
enabled: true
# 设置白名单,不填则允许所有访问
allow:
url-pattern: /druid/*
# 控制台管理用户名和密码
login-username: ${DRUID_USERNAME:admin}
login-password: ${DRUID_PASSWORD:admin123}
filter:
stat:
enabled: true
# 慢SQL记录
log-slow-sql: true
slow-sql-millis: 1000
merge-sql: true
wall:
config:
multi-statement-allow: true
# Redis配置
redis:
host: ${REDIS_HOST:anxin-redis}
port: ${REDIS_PORT:6379}
password: ${REDIS_PASSWORD:}
database: ${REDIS_DATABASE:0}
timeout: 10s
lettuce:
pool:
# 连接池最大连接数
max-active: 200
# 连接池最大阻塞等待时间(使用负值表示没有限制)
max-wait: -1ms
# 连接池中的最大空闲连接
max-idle: 10
# 连接池中的最小空闲连接
min-idle: 0
# 日志配置
logging:
config: /app/config/logback-spring.xml
level:
com.ruoyi: ${LOG_LEVEL:DEBUG}
root: ${LOG_LEVEL:INFO}
file:
path: ${LOG_PATH:/app/logs}
name: ${LOG_PATH:/app/logs}/application.log
# 若依配置
ruoyi:
# 名称
name: 安信数字信贷系统
# 版本
version: 1.0.0
# 版权年份
copyrightYear: 2024
# 实例演示开关
demoEnabled: true
# 文件路径 示例( Windows配置D:/ruoyi/uploadPathLinux配置 /home/ruoyi/uploadPath
profile: ${UPLOAD_PATH:/app/uploadPath}
# 获取ip地址开关
addressEnabled: false
# 验证码类型 math 数组计算 char 字符验证
captchaType: math
# token配置
token:
# 令牌自定义标识
header: Authorization
# 令牌密钥
secret: ${JWT_SECRET:abcdefghijklmnopqrstuvwxyz}
# 令牌有效期默认30分钟
expireTime: ${JWT_EXPIRE_TIME:30}
# MyBatis配置
mybatis:
# 搜索指定包别名
typeAliasesPackage: com.ruoyi.**.domain
# 配置mapper的扫描找到所有的mapper.xml映射文件
mapperLocations: classpath*:mapper/**/*Mapper.xml
# 加载全局的配置文件
configLocation: classpath:mybatis/mybatis-config.xml
# PageHelper分页插件
pagehelper:
helperDialect: mysql
supportMethodsArguments: true
params: count=countSql
# Swagger配置
swagger:
# 是否开启swagger
enabled: ${SWAGGER_ENABLED:true}
# 请求前缀
pathMapping: /dev-api
# 防止XSS攻击
xss:
# 过滤开关
enabled: true
# 排除链接(多个用逗号分隔)
excludes: /system/notice
# 匹配链接
urlPatterns: /system/*,/monitor/*,/tool/*
# 代码生成
gen:
# 作者
author: ruoyi
# 默认生成包路径 system 需改成自己的模块名称 如 system monitor tool
packageName: com.ruoyi.system
# 自动去除表前缀默认是false
autoRemovePre: false
# 表前缀(生成类名不会包含表前缀,多个用逗号分隔)
tablePrefix: sys_
# 监控配置
management:
endpoints:
web:
exposure:
include: ${MANAGEMENT_ENDPOINTS_WEB_EXPOSURE_INCLUDE:health,info,metrics}
endpoint:
health:
show-details: always
# Redisson配置
redisson:
# 线程池数量
threads: 16
# Netty线程池数量
nettyThreads: 32
# 单节点配置
single-server-config:
address: redis://${REDIS_HOST:anxin-redis}:${REDIS_PORT:6379}
password: ${REDIS_PASSWORD:}
database: ${REDIS_DATABASE:0}
# 连接超时,单位:毫秒
connectTimeout: 10000
# 命令等待超时,单位:毫秒
timeout: 3000
# 命令失败重试次数
retryAttempts: 3
# 命令重试发送时间间隔,单位:毫秒
retryInterval: 1500
# 连接池大小
connectionPoolSize: 64
# 最小空闲连接数
connectionMinimumIdleSize: 10
# 空闲连接超时,单位:毫秒
idleConnectionTimeout: 10000
# ping连接间隔
pingTimeout: 1000
# keep alive
keepAlive: true