Browse Source

更新远程连接qa启动服务配置

maixinrong 5 years ago
parent
commit
92c8e14c59
3 changed files with 92 additions and 0 deletions
  1. 1 0
      .gitignore
  2. 90 0
      config/config.remoteqa.js
  3. 1 0
      package.json

+ 1 - 0
.gitignore

@@ -9,3 +9,4 @@ app/public/download/
 .DS_Store
 *.swp
 package-lock.json
+app/public/js/web

+ 90 - 0
config/config.remoteqa.js

@@ -0,0 +1,90 @@
+'use strict';
+/**
+ * 开发环境相关配置
+ *
+ * @author CaiAoLin
+ * @date 2017/8/29
+ * @version
+ */
+
+module.exports = appInfo => {
+    const config = {};
+    // 数据库配置
+    config.mysql = {
+        client: {
+            // host
+            host: 'smartcost.in.8866.org',
+            // 端口号
+            port: '26905',
+            // 用户名
+            user: 'zh_dev',
+            // 密码
+            password: 'zongheng2019',
+            // 数据库名
+            database: 'calculation',
+            // database: 'calc_copy_pro',
+        },
+        // 是否加载到 app 上,默认开启
+        app: true,
+        // 是否加载到 agent 上,默认关闭
+        agent: false,
+    };
+    // 表名前缀
+    config.tablePrefix = 'zh_';
+
+    // redis设置
+    config.redis = {
+        client: {
+            host: 'smartcost.in.8866.org',
+            port: '26906',
+            password: 'zongheng2019',
+            db: '0',
+        },
+        agent: true,
+    };
+
+    // geetest验证码key
+    config.geetest = {
+        id: '23c50f6711966f744c93a70167c8e0a4',
+        key: '9b67989994f9def437ea68bb495f0162',
+    };
+
+    // 前端验证
+    config.jsValidator = {
+        client: {},
+        app: true,
+    };
+
+    // 上传设置
+    config.multipart = {
+        whitelist: ['.json', '.txt',
+            '.xls', '.xlsx',
+            '.doc', '.docx',
+            '.pdf',
+            '.png', '.jpg', '.jpeg', '.gif', '.bmp',
+            '.zip', '.rar', '.7z'],
+        fileSize: '30mb',
+    };
+
+    // session配置
+    config.session = {
+        key: 'ZHC_SESS',
+        maxAge: 7 * 24 * 3600 * 1000, // 7天
+        httpOnly: true,
+        encrypt: true,
+        //renew: true, // session临近过期更新过期时间
+        rolling: true, // 每次都更新session有效期
+    };
+
+    // 是否压缩替换前端js
+    config.min = false;
+
+    config.logger = {
+        consoleLevel: 'WARN',
+        disableConsoleAfterReady: false,
+    };
+
+    config.is_debug = true;
+
+    return config;
+};

+ 1 - 0
package.json

@@ -61,6 +61,7 @@
     "start-qa": "set EGG_SERVER_ENV=qa&&egg-scripts start --daemon --port 7002",
     "dev": "egg-bin dev --port 7002",
     "dev-local": "set EGG_SERVER_ENV=local&&egg-bin dev --port 7002",
+    "dev-remoteqa": "set EGG_SERVER_ENV=remoteqa&&egg-bin dev --port 7002",
     "dev-temp": "set EGG_SERVER_ENV=temp&&egg-bin dev --port 7002",
     "dev-qa": "set EGG_SERVER_ENV=qa&&egg-bin dev --port 7002",
     "dev-test": "set EGG_SERVER_ENV=test&&egg-bin dev --port 7002",