# ===== 服务器基础配置 =====
# 服务器内网 IP。scripts/deploy.sh 会自动探测并写入 .env，也可手动改。
SERVER_IP=127.0.0.1

# ===== 镜像版本 =====
MONGO_IMAGE=mongo:7.0
REDIS_IMAGE=redis:7.0.0
KAFKA_IMAGE=bitnamilegacy/kafka:3.5.1
MINIO_IMAGE=minio/minio:RELEASE.2024-01-11T07-46-16Z
ETCD_IMAGE=bitnamilegacy/etcd:3.5.13
OPENIM_SERVER_IMAGE=openim/openim-server:v3.8.3-patch.12
LIVEKIT_IMAGE=livekit/livekit-server:v1.13.5
# 国内拉镜像慢时，OpenIM 可换阿里云镜像：
#OPENIM_SERVER_IMAGE=registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-server:release-v3.8.3

# 监控组件（可选，仅 docker compose --profile m up -d 时启动）
PROMETHEUS_IMAGE=prom/prometheus:v2.51.2
ALERTMANAGER_IMAGE=prom/alertmanager:v0.27.0
GRAFANA_IMAGE=grafana/grafana:11.0.1
NODE_EXPORTER_IMAGE=prom/node-exporter:v1.7.0

# ===== 数据目录（相对 docker-compose.yaml 所在目录）=====
DATA_DIR=./

# ===== MongoDB =====
MONGO_ADDRESS="mongo:27017"
MONGO_USERNAME=openIM
MONGO_PASSWORD=openIM123

# ===== Kafka =====
KAFKA_ADDRESS="kafka:9094"
# 默认不启用 Kafka 认证；如需启用取消下面两行注释（启动时的缺变量警告可忽略）
#KAFKA_USERNAME=openIM
#KAFKA_PASSWORD=openIM123

# ===== Etcd =====
ETCD_ADDRESS="etcd:2379"
# 默认不启用 Etcd 认证；如需启用取消下面四行注释
#ETCD_ROOT_USER=root
#ETCD_ROOT_PASSWORD=openIM123
#ETCD_USERNAME=openIM
#ETCD_PASSWORD=openIM123

# ===== Redis =====
REDIS_ADDRESS="redis:6379"
REDIS_PASSWORD=openIM123

# ===== MinIO（图片/语音/文件存储）=====
# 关键：必须是客户端（手机/PC）能访问到的地址，deploy.sh 会写入 http://<SERVER_IP>:10005
MINIO_EXTERNAL_ADDRESS="http://127.0.0.1:10005"
MINIO_INTERNAL_ADDRESS="minio:9000"
MINIO_ACCESS_KEY_ID=root
MINIO_SECRET_ACCESS_KEY=openIM123
MINIO_PORT=10005
MINIO_CONSOLE_PORT=10004

# ===== OpenIM 服务端 =====
OPENIM_SECRET=openIM123
OPENIM_API_PORT=10002
OPENIM_MSG_GATEWAY_PORT=10001
LOG_IS_STDOUT=true
LOG_LEVEL=3

# ===== LiveKit（一对一语音通话）=====
LIVEKIT_API_KEY=openimLKkey
# secret 必须 ≥32 字符，否则 LiveKit 启动报 secret is too short
LIVEKIT_API_SECRET=lk-secret-9f2c7a41d5e8b063f1a4c795e2d8b3a6
# 三个都是宿主机映射端口；7880/7881/7882 被占用时改成 17880/17881/17882 之类即可
LIVEKIT_PORT=7880
LIVEKIT_RTC_TCP_PORT=7881
LIVEKIT_RTC_UDP_PORT=7882

# ===== 公司账号服务（工号+密码登录，自研）=====
# 宿主端口；管理页 http://<SERVER_IP>:10010/
ACCOUNT_PORT=10010
# 管理页/管理接口口令，部署时务必改掉
ACCOUNT_ADMIN_TOKEN=admin123

# ===== 监控端口（可选）=====
PROMETHEUS_PORT=19090
ALERTMANAGER_PORT=19093
GRAFANA_PORT=13000
NODE_EXPORTER_PORT=19100
GRAFANA_URL="http://127.0.0.1:13000/"
