|
|
@ -13,8 +13,8 @@ args.option(['g', 'pg'], 'postgre 服务 URL'); |
|
|
|
args.option(['f', 'fileHost'], '文件中心本地化存储: WebApi 服务器地址(必填), 该服务器提供文件上传Web服务'); |
|
|
|
args.option(['k', 'kafka'], 'kafka 服务 URL'); |
|
|
|
args.option(['e', 'es'], 'es 服务 URL'); |
|
|
|
// args.option(['c', 'camundaHost'], 'camunda rest host');
|
|
|
|
// args.option(['r', 'camundaRoot'], 'camunda rest root');
|
|
|
|
args.option(['c', 'camundaHost'], 'camunda rest host'); |
|
|
|
args.option(['r', 'camundaRoot'], 'camunda rest root'); |
|
|
|
args.option('iotaProxy', '以太代理') |
|
|
|
|
|
|
|
args.option('redisHost', 'redisHost'); |
|
|
@ -66,8 +66,8 @@ const flags = args.parse(process.argv); |
|
|
|
const POMS_DB = process.env.POMS_DB || flags.pg; |
|
|
|
const LOCAL_SVR_ORIGIN = process.env.LOCAL_SVR_ORIGIN || flags.fileHost; |
|
|
|
//项企
|
|
|
|
// const FS_CAMUNDA_HOST = process.env.CAMUNDA_HOST || flags.camundaHost;
|
|
|
|
// const FS_CAMUNDA_ROOT = process.env.CAMUNDA_ROOT || flags.camundaRoot;
|
|
|
|
const FS_CAMUNDA_HOST = process.env.CAMUNDA_HOST || flags.camundaHost; |
|
|
|
const FS_CAMUNDA_ROOT = process.env.CAMUNDA_ROOT || flags.camundaRoot; |
|
|
|
|
|
|
|
// kafka
|
|
|
|
const ANXINCLOUD_KAFKA_BROKERS = process.env.ANXINCLOUD_KAFKA_BROKERS || flags.kafka; |
|
|
@ -135,24 +135,28 @@ const ES_PLATFORM_NAME = process.env.ES_PLATFORM_NAME || flags.esPlatformName |
|
|
|
|| 'anxinyun'; |
|
|
|
const ANXINCLOUD_ES_NODES_REST = process.env.ANXINCLOUD_ES_NODES_REST || flags.es; |
|
|
|
// //business_key
|
|
|
|
// const BUSINESS_KEY=process.env.BUSINESS_KEY||['160','161']
|
|
|
|
|
|
|
|
const requireParams = { |
|
|
|
// FS_CAMUNDA_HOST, FS_CAMUNDA_ROOT,
|
|
|
|
POMS_DB, |
|
|
|
IOTA_REDIS_SERVER_HOST, IOTA_REDIS_SERVER_PORT, |
|
|
|
ANXINCLOUD_KAFKA_BROKERS, |
|
|
|
GOD_KEY, |
|
|
|
API_ANXINYUN_URL, |
|
|
|
API_EMIS_URL, |
|
|
|
API_VCMP_URL, |
|
|
|
API_IOT_AUTH, |
|
|
|
QINIU_DOMAIN_QNDMN_RESOURCE, QINIU_BUCKET_RESOURCE, QINIU_AK, QINIU_SK, |
|
|
|
CLICKHOUST_URL, CLICKHOUST_PORT, |
|
|
|
CLICKHOUST_ANXINCLOUD, CLICKHOUST_PEP_EMIS, CLICKHOUST_PROJECT_MANAGE, CLICKHOUST_VCMP, CLICKHOUST_DATA_ALARM, CLICKHOUST_IOT, |
|
|
|
// CLICKHOUST_CAM_WORKFLOW,
|
|
|
|
CONFIRM_ALARM_ANXIN_USER_ID, |
|
|
|
VCMP_APP_ID, VCMP_APP_SECRET, |
|
|
|
// const BUSINESS_KEY=process.env.BUSINESS_KEY||['834','840']
|
|
|
|
if ( |
|
|
|
// !BUSINESS_KEY||
|
|
|
|
!FS_CAMUNDA_HOST || !FS_CAMUNDA_ROOT || |
|
|
|
!POMS_DB |
|
|
|
|| !IOTA_REDIS_SERVER_HOST || !IOTA_REDIS_SERVER_PORT |
|
|
|
|| !ANXINCLOUD_KAFKA_BROKERS |
|
|
|
|| !GOD_KEY |
|
|
|
|| !API_ANXINYUN_URL |
|
|
|
|| !API_EMIS_URL |
|
|
|
|| !API_VCMP_URL |
|
|
|
|| !API_IOT_AUTH |
|
|
|
|| !QINIU_DOMAIN_QNDMN_RESOURCE || !QINIU_BUCKET_RESOURCE || !QINIU_AK || !QINIU_SK |
|
|
|
|| !CLICKHOUST_URL || !CLICKHOUST_PORT |
|
|
|
|| !CLICKHOUST_ANXINCLOUD || !CLICKHOUST_PEP_EMIS || !CLICKHOUST_PROJECT_MANAGE || !CLICKHOUST_VCMP || !CLICKHOUST_DATA_ALARM || !CLICKHOUST_IOT |
|
|
|
// || !CLICKHOUST_CAM_WORKFLOW
|
|
|
|
|| !CONFIRM_ALARM_ANXIN_USER_ID |
|
|
|
|| !VCMP_APP_ID || !VCMP_APP_SECRET |
|
|
|
) { |
|
|
|
console.log('缺少启动参数,异常退出'); |
|
|
|
args.showHelp(); |
|
|
|
process.exit(-1); |
|
|
|
} |
|
|
|
|
|
|
|
Object.keys(requireParams).forEach(key => { |
|
|
@ -182,11 +186,11 @@ const product = { |
|
|
|
entry: require('./app').entry, |
|
|
|
opts: { |
|
|
|
dev, |
|
|
|
// BUSINESS_KEY,
|
|
|
|
// camundarest: {
|
|
|
|
// host: FS_CAMUNDA_HOST,
|
|
|
|
// root: FS_CAMUNDA_ROOT
|
|
|
|
// },
|
|
|
|
// business_key:BUSINESS_KEY,
|
|
|
|
camundarest: { |
|
|
|
host: FS_CAMUNDA_HOST, |
|
|
|
root: FS_CAMUNDA_ROOT |
|
|
|
}, |
|
|
|
exclude: [ |
|
|
|
// "*",
|
|
|
|
{ p: '/attachments/:p', o: 'POST' }, |
|
|
|