Files
EchoChat/media-server/.env.example

39 lines
1.5 KiB
Plaintext
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.

# ==================================================
# EchoChat media-server 环境变量示例
# 复制为 .env 后按需调整;关键参数参考 Phase 2e-2 设计文档 §D01
# ==================================================
# ---------------- HTTP 服务 ----------------
# media-server 对内(供 Go backend 调用HTTP 端口,不暴露公网
HTTP_HOST=0.0.0.0
HTTP_PORT=3300
# ---------------- 日志 ----------------
# trace | debug | info | warn | error
LOG_LEVEL=info
# 生产环境设为 false 输出 JSONdev 可设为 true 走 pino-pretty
LOG_PRETTY=true
# ---------------- 内部鉴权 ----------------
# Go backend 调 Node media-server 时携带 X-Internal-Token 头
# 双方必须一致;生产环境请通过 secret manager 注入
MEDIA_INTERNAL_TOKEN=internal-token-22xqs
# ---------------- mediasoup Worker ----------------
# ICE/DTLS/RTP 绑定 IPDocker 容器一般填 0.0.0.0
MEDIASOUP_LISTEN_IP=123.6.102.114
# 对外通告 IP本机 Demo 留空;公网填服务器公网 IP 或域名解析到的 IP
# 注意:本机 Demo 不要写 127.0.0.1,否则远端浏览器只能拿到回环地址
MEDIASOUP_ANNOUNCED_IP=123.6.102.114
# RTP UDP/TCP 端口范围MVP 约 25 用户级 Transport 足够)
MEDIASOUP_RTC_MIN_PORT=40000
MEDIASOUP_RTC_MAX_PORT=40199
# Worker 日志级别mediasoup 自身debug | warn | error | none
MEDIASOUP_WORKER_LOG_LEVEL=warn
# ---------------- Router 容量水位 ----------------
# 单 Worker 内存活 Router 数量上限(超过拒绝新建)
MEDIASOUP_MAX_ROUTERS=200