spark-server/configs/config.yaml
DESKTOP-L8OUL9F\gfl0034 753c276496 feat: PopAdmin 拉取管理、签到能量 API 与图片 150KiB 硬上限
管理端按用户查询开启通讯录/相册/媒体拉取;服务端写入路径自动压图;新增 /v1/sign 与 /v1/energy。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-02 12:44:06 +08:00

152 lines
3.5 KiB
YAML
Raw Permalink 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.

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: ""
# 服务端图片硬上限 150 KiB:objectstore Put/PutLarge 自动压缩;用户直传声明 size 也按此校验。
# user_reject=true 时超限拒凭证/发帖;false 仅打日志(App 仍应先压)。机器人 bot_compress 入库前再压。
media:
enabled: true
user_reject: true
bot_compress: true
image_max_edge: 1080
video_max_edge: 720
avatar_max_edge: 200
image_max_bytes: 153600
video_max_bytes: 104857600
avatar_max_bytes: 153600
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"