作者 yangfu

配置修改

... ... @@ -12,7 +12,8 @@ aliyun_logs_access ="${aliyun_logs_access||app.log}"
#redis相关配置
redis_add_port = "192.168.100.102:6379"
redis_add = "${REDIS_IP||192.168.100.102}"
redis_add_port = "${REDIS_PORT||6379}"
redis_auth = "123456"
#sms相关配置
... ...
[test]
#数据库相关
mysql_user = "${MYSQL_USER||root}"
mysql_password = "${MYSQL_PASSWORD||123456}"
mysql_host = "${MYSQL_HOST||192.168.100.102}"
mysql_password = "${MYSQL_PASSWORD||sutianxia2015}"
mysql_host = "${MYSQL_HOST||115.29.205.99}"
mysql_port = "${MYSQL_PORT||3306}"
mysql_db_name = "${MYSQL_DB_NAME||opportunity}"
#日志
log_level = "${LOG_LEVEL||debug}"
aliyun_logs_access ="app.log"
aliyun_logs_access ="${aliyun_logs_access||app.log}"
#redis相关配置
redis_add_port = "192.168.100.102:6379"
redis_auth = "123456"
redis_add = "${REDIS_IP||192.168.100.102}"
redis_add_port = "${REDIS_PORT||6379}"
redis_auth = ""
#sms相关配置
yunpian_sms_sdk_url ="https://sms.yunpian.com/v2/sms/single_send.json"
yunpian_app_key ="0bf6fb10a11a68a95dee80901eb545b5"
#存储 http://ability.fjmaimaimai.com:8080/
source_host ="http://192.168.139.131:8080/"
source_host ="http://192.168.139.137:8080/"
source_virtual_path=file/opp
source_path =/www/opp
source_path ="${aliyun_file_access||~/www/opp}
#网易云信 IM
net_im_base_url ="https://api.netease.im/nimserver"
net_im_app_secret ="a8d231f5c13a"
net_im_app_key ="9c5410602597a7fe367aeeebd8210262"
\ No newline at end of file
net_im_app_key ="9c5410602597a7fe367aeeebd8210262"
#统一用户中心 39aefef9e22744a3b2d2d3791824ae7b
user_center_url ="http://suplus-ucenter-dev.fjmaimaimai.com"
user_center_salt ="rsF0pL!6DwjBO735"
user_center_app_key ="39aefef9e22744a3b2d2d3791824ae7b"
user_center_app_secret ="cykbjnfqgctn"
\ No newline at end of file
... ...
... ... @@ -28,9 +28,10 @@ func init() {
// Addrs: []string{"127.0.0.1:9092"},
// Level: 6,
//})
err := redis.InitWithDb(100, beego.AppConfig.String("redis_add_port"), beego.AppConfig.String("redis_auth"), "0")
redisSource := fmt.Sprintf("%v:%v", beego.AppConfig.String("redis_add"), beego.AppConfig.String("redis_add_port"))
err := redis.InitWithDb(100, redisSource, beego.AppConfig.String("redis_auth"), "0")
if err != nil {
log.Fatal("connect to redis error address:",beego.AppConfig.String("redis_add_port"), beego.AppConfig.String("redis_auth"),err)
log.Fatal("connect to redis error address:", beego.AppConfig.String("redis_add_port"), beego.AppConfig.String("redis_auth"), err)
panic(err)
}
dataSource := fmt.Sprintf("%s:%s@tcp(%s:%s)/%s?loc=Asia%%2FShanghai",
... ...