spark-server/deploy/docker/config.docker.yaml

149 lines
3.2 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.

env: prod
server:
http:
addr: "0.0.0.0:8080"
tcp:
addr: "0.0.0.0:9090"
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: info
encoding: json
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(mysql:3306)/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: "redis:6379"
username: ""
password: ""
db: 0
deliver_queue_key: "deliver:queue"
deliver_processing_key: "deliver:processing"
deliver_done_prefix: "deliver:done:"
jwt:
secret: "0e624dce0ebe9115c2eb048646a141ccbd88366e7f2c2718065bc3a3838dda95"
issuer: "spark-im"
ttl: 168h
refresh_ttl: 720h
denylist_prefix: "denylist:"
refresh_prefix: "refresh:"
# Must match Java WYRS_ADMIN_JWT_SECRET (popadmin login).
# Prod validate REJECTS the jar default "wyrs-admin-jwt-secret-change-in-production-2025".
# Prefer setting the same value via SPARK_ADMIN_JWT_SECRET and /etc/wyrs-admin/app.env.
admin:
jwt_secret: "replace-with-shared-WYRS_ADMIN_JWT_SECRET"
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: "rustfs: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
# App 主压缩;服务端用户检测 + 机器人入库前压缩(视频需镜像内 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"
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"
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: ""