Files
media/config.yml

80 lines
2.3 KiB
YAML
Raw Normal View History

2026-05-19 14:33:06 +08:00
server:
address : ":3001"
name: "media"
workerId: 1
logPath: "resource/log/server"
logStdout: true
errorStack: true
# 开启请求访问日志
accessLogEnabled: true
# 上传文件大小限制(视频文件通常较大)
clientMaxBodySize: "200MB"
rate:
limit: 200
burst: 300
# 数据库配置PostgreSQL
database:
default:
type: "pgsql"
host: "116.204.74.41"
port: "15432"
user: "postgres"
pass: "Bjang09@686^*^"
name: "media"
role: "master"
maxIdle: "5"
maxOpen: "20"
maxLifetime: "60s"
charset: "utf8mb4"
debug: true
dryRun: false
createdAt: "created_at"
updatedAt: "updated_at"
deletedAt: "deleted_at"
timeMaintainDisabled: false
2026-05-20 11:32:39 +08:00
redis:
# 集群模式配置方法
default:
address: 116.204.74.41:6379
db: 0
idleTimeout: "60s" #连接最大空闲时间使用时间字符串例如30s/1m/1d
maxConnLifetime: "90s" #连接最长存活时间使用时间字符串例如30s/1m/1d
waitTimeout: "60s" #等待连接池连接的超时时间使用时间字符串例如30s/1m/1d
dialTimeout: "30s" #TCP连接的超时时间使用时间字符串例如30s/1m/1d
readTimeout: "30s" #TCP的Read操作超时时间使用时间字符串例如30s/1m/1d
writeTimeout: "30s" #TCP的Write操作超时时间使用时间字符串例如30s/1m/1d
maxActive: 100
2026-05-19 14:33:06 +08:00
consul:
address: 192.168.3.30:8500
jaeger:
2026-05-20 11:32:39 +08:00
addr: 192.168.3.30:4318
2026-05-19 14:33:06 +08:00
# FFmpeg 配置(视频音频提取)
ffmpeg:
# ffmpeg 可执行文件路径,留空则从 PATH 查找
path: ""
# 临时文件目录(上传的视频和提取的音频)
temp_dir: "resource/temp"
2026-05-20 11:32:39 +08:00
# OSS/MinIO 文件上传配置
filePrefix: "http://116.204.74.41:9000"
2026-05-19 14:33:06 +08:00
# Whisper 语音识别配置
whisper:
# whisper 可执行文件路径,留空则自动查找
# 优先检测: whisper-cpp(推荐) > whisper > python -m whisper
# 安装 whisper.cpp: brew install whisper-cpp速度比 Python 快 3-5 倍)
path: ""
# 默认模型: tiny(75MB/最快) / base(150MB) / small(500MB) / medium(1.5GB)
# CPU 环境建议用 tinyMacBook Air 用 base 即可
model: "medium"
# 默认语言zh=中文, en=英文, ja=日文 等)
language: "zh"
# 模型缓存目录,留空使用默认 (~/.cache/whisper/)
model_dir: ""
# CPU 线程数(限制资源占用,建议 2-4
threads: 2