1.6.5 服务器配置

E聊后端使用springboot框架开发,故配置是标准的application.yml 配置.

1.application.yml 配置项

# socket.io长连接配置
socketio:
  host:
  port: ${SOCKETIO_PORT:9092} # socket.io 服务端口

# 中间件配置
broker:
... 略 ...
  storage:
    use: ${BROKER_STORAGE_USE:google} # 单机部署使用google即可
    redis-host: ${BROKER_STORAGE_REDIS_HOST:localhost} # 若上一项配置成redis, 就使用该配置
  event:
    use: ${BROKER_EVENT_USE:eventbus} # 单机部署使用eventbus即可
    mq-server: ${BROKER_EVENT_MQ_SERVER:192.168.0.6:9092}
    mq-point: ${BROKER_EVENT_MQ_POINT:POINT-A2}
... 略 ...


server:
    port: ${SERVER_PORT:8082} # http api服务端口

# 按实际数据库的情况配置
spring:
  datasource:
    username: root 
    password:
    url: ${SPRING_DATASOURCE_URL:jdbc:mysql://localhost:3306/echatim?useUnicode=true&characterEncoding=utf-8&useSSL=false&autoReconnect=true&serverTimezone=Asia/Shanghai}
... 略 ...

2.application-local.yml 配置项(文件服务器)

echatim:
  sdk:
    auth-type: community # 授权类型是社区版(community)

  file:        # 本地文件服务器
    host: localhost:8082
    resource-address: http://localhost:8082 # 本地服务器外网地址
    upload-file-dir: /tmp/upload_files # windows系统请改成 C:\\upload_files
    sign-expire: 60000 # 上传 signature 失效时间(1分钟)

results matching ""

    No results matching ""