...
|
...
|
@@ -5,16 +5,23 @@ const path = require('path'); |
|
|
const env = process.env.NODE_ENV || 'development';
|
|
|
|
|
|
const defaults = {
|
|
|
port: 9000,
|
|
|
buildDir: path.normalize(__dirname + '/../packages/'),
|
|
|
dbDir: path.normalize(__dirname + '/../db'),
|
|
|
influxdb: {
|
|
|
host: 'influxd.yoho.cn',
|
|
|
port: 80
|
|
|
},
|
|
|
redis: {
|
|
|
connect: {
|
|
|
host: '127.0.0.1',
|
|
|
port: 9000,
|
|
|
buildDir: path.normalize(__dirname + '/../packages/'),
|
|
|
dbDir: path.normalize(__dirname + '/../db'),
|
|
|
influxdb: {
|
|
|
aws: {
|
|
|
host: 'influxd.yoho.cn',
|
|
|
port: 80
|
|
|
},
|
|
|
qcloud: {
|
|
|
host: 'influxd.yoho.cn',
|
|
|
port: 80
|
|
|
}
|
|
|
|
|
|
},
|
|
|
redis: {
|
|
|
connect: {
|
|
|
host: '127.0.0.1',
|
|
|
port: '6379',
|
|
|
retry_strategy: options => {
|
|
|
if (options.error && options.error.code === 'ECONNREFUSED') {
|
...
|
...
|
@@ -29,65 +36,71 @@ const defaults = { |
|
|
}
|
|
|
return Math.min(options.attempt * 100, 1000);
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
mysql: {
|
|
|
host: '192.168.102.219',
|
|
|
user: 'yh_test',
|
|
|
password: 'yh_test',
|
|
|
port: '3306',
|
|
|
database: 'yoho_seo'
|
|
|
},
|
|
|
domains: {
|
|
|
// test3
|
|
|
singleApi: 'http://api-test3.yohops.com:9999/',
|
|
|
api: 'http://api-test3.yohops.com:9999/',
|
|
|
service: 'http://service-test3.yohops.com:9999/',
|
|
|
serviceNotify: 'http://service-test3.yohops.com:9999/',
|
|
|
global: 'http://global-test-soa.yohops.com:9999/',
|
|
|
platformApi: 'http://192.168.102.48:8088/',
|
|
|
search: 'http://192.168.102.216:8080/yohosearch/',
|
|
|
}
|
|
|
},
|
|
|
mysql: {
|
|
|
host: '192.168.102.219',
|
|
|
user: 'yh_test',
|
|
|
password: 'yh_test',
|
|
|
port: '3306',
|
|
|
database: 'yoho_seo'
|
|
|
},
|
|
|
domains: {
|
|
|
// test3
|
|
|
singleApi: 'http://api-test3.yohops.com:9999/',
|
|
|
api: 'http://api-test3.yohops.com:9999/',
|
|
|
service: 'http://service-test3.yohops.com:9999/',
|
|
|
serviceNotify: 'http://service-test3.yohops.com:9999/',
|
|
|
global: 'http://global-test-soa.yohops.com:9999/',
|
|
|
platformApi: 'http://192.168.102.48:8088/',
|
|
|
search: 'http://192.168.102.216:8080/yohosearch/',
|
|
|
|
|
|
imSocket: 'ws://socket.yohobuy.com:10240',
|
|
|
imCs: 'http://im.yohobuy.com/api',
|
|
|
unionApi: 'http://172.16.6.90:8080/',
|
|
|
imSocket: 'ws://socket.yohobuy.com:10240',
|
|
|
imCs: 'http://im.yohobuy.com/api',
|
|
|
unionApi: 'http://172.16.6.90:8080/',
|
|
|
|
|
|
},
|
|
|
},
|
|
|
baiduToken: '0lSAO4ZxEKsYopMG',
|
|
|
|
|
|
// redis key prefix
|
|
|
singleBrandKeyPre: 'golobal:yoho:single_brand:', // key: 品牌id, val: 名牌名
|
|
|
singleSortKeyPre: 'golobal:yoho:single_sort:' // key: 品类id, val: 品类名
|
|
|
// redis key prefix
|
|
|
singleBrandKeyPre: 'golobal:yoho:single_brand:', // key: 品牌id, val: 名牌名
|
|
|
singleSortKeyPre: 'golobal:yoho:single_sort:' // key: 品类id, val: 品类名
|
|
|
};
|
|
|
|
|
|
const specific = {
|
|
|
development: {},
|
|
|
test: {},
|
|
|
production: {
|
|
|
development: {},
|
|
|
test: {},
|
|
|
production: {
|
|
|
influxdb: {
|
|
|
host: 'influxdblog.web.yohoops.org',
|
|
|
port: 4444
|
|
|
aws: {
|
|
|
host: '172.31.26.70',
|
|
|
port: 8086
|
|
|
},
|
|
|
qcloud: {
|
|
|
host: '10.66.0.139',
|
|
|
port: 8086
|
|
|
}
|
|
|
},
|
|
|
redis: {
|
|
|
connect: {
|
|
|
host: 'web.redis.yohoops.org',
|
|
|
port: '6379',
|
|
|
retry_strategy: options => {
|
|
|
if (options.error && options.error.code === 'ECONNREFUSED') {
|
|
|
console.log('redis连接不成功');
|
|
|
}
|
|
|
if (options.total_retry_time > 1000 * 60 * 60 * 6) {
|
|
|
console.log('redis连接超时');
|
|
|
return;
|
|
|
}
|
|
|
if (options.attempt > 10) {
|
|
|
return 1000 * 60 * 60 * 0.5;
|
|
|
}
|
|
|
return Math.min(options.attempt * 100, 1000);
|
|
|
if (options.error && options.error.code === 'ECONNREFUSED') {
|
|
|
console.log('redis连接不成功');
|
|
|
}
|
|
|
if (options.total_retry_time > 1000 * 60 * 60 * 6) {
|
|
|
console.log('redis连接超时');
|
|
|
return;
|
|
|
}
|
|
|
if (options.attempt > 10) {
|
|
|
return 1000 * 60 * 60 * 0.5;
|
|
|
}
|
|
|
return Math.min(options.attempt * 100, 1000);
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
mysql: {
|
|
|
mysql: {
|
|
|
host: '172.31.200.242',
|
|
|
user: 'yoho_seo_user',
|
|
|
password: 'eRUWnPm6nqWT',
|
...
|
...
|
@@ -95,15 +108,15 @@ const specific = { |
|
|
database: 'yoho_seo',
|
|
|
},
|
|
|
domains: {
|
|
|
singleApi: 'http://single.yoho.cn/',
|
|
|
api: 'http://api.yoho.cn/',
|
|
|
service: 'http://service.yoho.cn/',
|
|
|
serviceNotify: 'http://service.yoho.cn/',
|
|
|
global: 'http://api-global.yohobuy.com/',
|
|
|
platformApi: 'http://172.16.6.210:8088/',
|
|
|
search: 'http://search.yohoops.org/yohosearch/'
|
|
|
singleApi: 'http://single.yoho.cn/',
|
|
|
api: 'http://api.yoho.cn/',
|
|
|
service: 'http://service.yoho.cn/',
|
|
|
serviceNotify: 'http://service.yoho.cn/',
|
|
|
global: 'http://api-global.yohobuy.com/',
|
|
|
platformApi: 'http://172.16.6.210:8088/',
|
|
|
search: 'http://search.yohoops.org/yohosearch/'
|
|
|
}
|
|
|
},
|
|
|
},
|
|
|
};
|
|
|
|
|
|
module.exports = Object.assign(defaults, specific[env]); |
|
|
\ No newline at end of file |
...
|
...
|
|