add redis username

pull/255/head
Gordon 3 years ago
parent d3b302ce66
commit b70a4070f2

@ -32,8 +32,8 @@ services:
- wiredTigerCacheSizeGB=1
# - MONGO_USERNAME=openIM
# - MONGO_PASSWORD=openIM
- MONGO_INITDB_ROOT_USERNAME=root
- MONGO_INITDB_ROOT_PASSWORD=root
# - MONGO_INITDB_ROOT_USERNAME=root
# - MONGO_INITDB_ROOT_PASSWORD=root
# - MONGO_INITDB_DATABASE=openIM
restart: always

@ -3,6 +3,7 @@ package db
import (
"Open_IM/pkg/common/config"
"go.mongodb.org/mongo-driver/x/bsonx"
"open_im_sdk/pkg/log"
"strings"
//"Open_IM/pkg/common/log"
@ -119,6 +120,7 @@ func init() {
// )
// },
//}
fmt.Println("tes", config.Config.Redis.DBUserName, config.Config.Redis.DBPassWord)
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
defer cancel()
if config.Config.Redis.EnableCluster {

Loading…
Cancel
Save