152 lines
3.5 KiB
YAML
152 lines
3.5 KiB
YAML
env: dev
|
||
|
||
server:
|
||
http:
|
||
addr: "127.0.0.1:8080"
|
||
tcp:
|
||
addr: "127.0.0.1:8090"
|
||
proxy_protocol: true
|
||
tls:
|
||
cert_file: ""
|
||
key_file: ""
|
||
max_frame_size: 65536
|
||
idle_timeout: 120s
|
||
keepalive: 30s
|
||
recv_buffer: 16777216
|
||
send_buffer: 16777216
|
||
multicore: true
|
||
compress_min_size: 512
|
||
|
||
id:
|
||
snowflake_worker_id: 1
|
||
|
||
log:
|
||
level: debug
|
||
encoding: console
|
||
console: true
|
||
file:
|
||
path: "logs/spark-server.log"
|
||
max_size_mb: 100
|
||
max_backups: 7
|
||
max_age_days: 7
|
||
compress: true
|
||
|
||
mysql:
|
||
dsn: "spark:zpQxymHedkYrr8dK@tcp(47.236.66.9:3307)/spark?charset=utf8mb4&parseTime=True&loc=Local"
|
||
slow_threshold: 200ms
|
||
log_level: ""
|
||
max_open_conns: 64
|
||
max_idle_conns: 16
|
||
conn_max_lifetime: 30m
|
||
conn_max_idle_time: 10m
|
||
|
||
redis:
|
||
addr: "47.236.66.9:6379"
|
||
username: ""
|
||
password: "kL4co8TEaE68vnMk"
|
||
db: 0
|
||
deliver_queue_key: "deliver:queue"
|
||
deliver_processing_key: "deliver:processing"
|
||
deliver_done_prefix: "deliver:done:"
|
||
|
||
jwt:
|
||
secret: "dev-only-change-me"
|
||
issuer: "spark-im"
|
||
ttl: 168h
|
||
refresh_ttl: 720h
|
||
denylist_prefix: "denylist:"
|
||
refresh_prefix: "refresh:"
|
||
pair_key_mode: "triple"
|
||
|
||
# Must match Aliyun WYRS_ADMIN_JWT_SECRET (popadmin login).
|
||
# Prod rejects the jar default "...-production-2025"; set a shared non-default secret.
|
||
admin:
|
||
jwt_secret: "wyrs-admin-jwt-secret-change-in-production-2025"
|
||
|
||
taskpool:
|
||
size: 256
|
||
queue: 1024
|
||
|
||
deliver:
|
||
workers: 8
|
||
take_timeout: 5s
|
||
done_ttl: 10m
|
||
|
||
session:
|
||
outbound_queue_size: 1024
|
||
|
||
rate_limit:
|
||
message_per_second: 20
|
||
auth_per_second: 5
|
||
sync_inbox_per_minute: 60
|
||
sync_messages_per_minute: 120
|
||
history_per_minute: 200
|
||
upload_per_second: 10
|
||
|
||
message:
|
||
max_content_size: 65536
|
||
sync_limit: 200
|
||
msgid_expire_ms: 300000
|
||
|
||
object_storage:
|
||
endpoint: "47.236.66.9:9000"
|
||
public_endpoint: "https://sparkr.wyrs365.com"
|
||
access_key: "rustfs_spark"
|
||
secret_key: 'kWvGtYT/~q+35q;3dSI<^P!MH+bgrpBg'
|
||
bucket: "spark"
|
||
region: "us-east-1"
|
||
use_ssl: false
|
||
presign_ttl: 15m
|
||
chat_expire_days: 365
|
||
|
||
sms:
|
||
smtp:
|
||
host: "smtpdm-ap-southeast-1.aliyuncs.com"
|
||
port: 465
|
||
username: "noreply@sparkmail.wyrs365.com"
|
||
password: "gD9UNvSt5ilagfa1"
|
||
from: "Spark IM <noreply@sparkmail.wyrs365.com>"
|
||
aliyun_sms:
|
||
access_key_id: ""
|
||
access_key_secret: ""
|
||
sign_name: ""
|
||
templates:
|
||
login:
|
||
mobile: ""
|
||
unicom: ""
|
||
telecom: ""
|
||
account_delete:
|
||
mobile: ""
|
||
unicom: ""
|
||
telecom: ""
|
||
|
||
# 用户上传:检测/校验(默认仅日志;user_reject=true 则拒凭证/发帖)。主压缩仍在 App。
|
||
# 机器人媒体:bot_compress=true 时入库前压到图≤1080 / 视频≤720(视频需 ffmpeg)。
|
||
media:
|
||
enabled: true
|
||
user_reject: false
|
||
bot_compress: true
|
||
image_max_edge: 1080
|
||
video_max_edge: 720
|
||
avatar_max_edge: 200
|
||
image_max_bytes: 10485760
|
||
video_max_bytes: 104857600
|
||
avatar_max_bytes: 2097152
|
||
jpeg_quality: 85
|
||
video_crf: 23
|
||
ffmpeg_path: "ffmpeg"
|
||
|
||
# 广场机器人:每 interval 随机 bot 发一条海外主流媒体公开 RSS(标题+短摘要+原文链接)。
|
||
# 需先跑 cmd/seed 确保 bot001@spark.bot … 存在。机器人帖 ttl 后自动清理。
|
||
square_bot:
|
||
enabled: true
|
||
interval: 5m
|
||
ttl: 360h
|
||
bot_indexes: []
|
||
feeds:
|
||
- "https://feeds.bbci.co.uk/news/world/rss.xml"
|
||
- "https://www.theguardian.com/world/rss"
|
||
- "https://feeds.npr.org/1004/rss.xml"
|
||
- "https://www.aljazeera.com/xml/rss/all.xml"
|
||
- "https://rss.nytimes.com/services/xml/rss/nyt/World.xml"
|