Browse Source

配置修改

lrf 1 year ago
parent
commit
76263e5bea
6 changed files with 75 additions and 29 deletions
  1. 46 0
      .github/workflows/nodejs.yml
  2. 2 2
      .travis.yml
  3. 1 1
      appveyor.yml
  4. 6 6
      config/config.default.js
  5. 19 19
      config/config.local.js
  6. 1 1
      config/config.prod.js

+ 46 - 0
.github/workflows/nodejs.yml

@@ -0,0 +1,46 @@
+# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
+# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
+
+name: Node.js CI
+
+on:
+  push:
+    branches:
+      - main
+      - master
+  pull_request:
+    branches:
+      - main
+      - master
+  schedule:
+    - cron: '0 2 * * *'
+
+jobs:
+  build:
+    runs-on: ${{ matrix.os }}
+
+    strategy:
+      fail-fast: false
+      matrix:
+        node-version: [10]
+        os: [ubuntu-latest, windows-latest, macos-latest]
+
+    steps:
+    - name: Checkout Git Source
+      uses: actions/checkout@v2
+
+    - name: Use Node.js ${{ matrix.node-version }}
+      uses: actions/setup-node@v1
+      with:
+        node-version: ${{ matrix.node-version }}
+
+    - name: Install Dependencies
+      run: npm i -g npminstall@5 && npminstall
+
+    - name: Continuous Integration
+      run: npm run ci
+
+    - name: Code Coverage
+      uses: codecov/codecov-action@v1
+      with:
+        token: ${{ secrets.CODECOV_TOKEN }}

+ 2 - 2
.travis.yml

@@ -1,9 +1,9 @@
-sudo: false
+
 language: node_js
 node_js:
   - '10'
 before_install:
-  - npm i npminstall -g
+  - npm i npminstall@5 -g
 install:
   - npminstall
 script:

+ 1 - 1
appveyor.yml

@@ -4,7 +4,7 @@ environment:
 
 install:
   - ps: Install-Product node $env:nodejs_version
-  - npm i npminstall && node_modules\.bin\npminstall
+  - npm i npminstall@5 && node_modules\.bin\npminstall
 
 test_script:
   - node --version

+ 6 - 6
config/config.default.js

@@ -60,7 +60,7 @@ module.exports = appInfo => {
   config.proxy = true;
   config.hostHeaders = 'x-forwarded-host';
   // 服务器发布路径
-  config.baseUrl = 'http://free.liaoningdoupo.com';
+  config.baseUrl = 'http://jytz.jilinjobs.cn';
   // 认证回调地址
   config.authUrl = '/api/train/auth';
   // 回调地址
@@ -108,11 +108,11 @@ module.exports = appInfo => {
   config.mongoose = {
     url: 'mongodb://127.0.0.1:27017/train',
     options: {
-      // user: 'admin',
-      // pass: 'admin',
-      // authSource: 'admin',
-      // useNewUrlParser: true,
-      // useCreateIndex: true,
+      user: 'root',
+      pass: 'root',
+      authSource: 'admin',
+      useNewUrlParser: true,
+      useCreateIndex: true,
     },
   };
   // config.mongoose = {

+ 19 - 19
config/config.local.js

@@ -18,31 +18,31 @@ module.exports = () => {
   };
 
   // 服务器发布路径
-  config.baseUrl = 'http://free.liaoningdoupo.com';
+  config.baseUrl = 'http://jytz.jilinjobs.cn/';
   // 认证回调地址
   config.authUrl = '/api/auth';
 
   // mq config
-  // config.amqp = {
-  //   client: {
-  //     hostname: '127.0.0.1',
-  //     username: 'wy',
-  //     password: '1',
-  //     vhost: 'smart',
-  //   },
-  //   app: true,
-  //   agent: true,
-  // };
+  config.amqp = {
+    client: {
+      hostname: '192.168.1.128',
+      username: 'visit',
+      password: 'visit',
+      vhost: 'train',
+    },
+    app: true,
+    agent: true,
+  };
 
   // redis config
-  // config.redis = {
-  //   client: {
-  //     port: 6379, // Redis port
-  //     host: '127.0.0.1', // Redis host
-  //     password: null,
-  //     db: 0,
-  //   },
-  // };
+  config.redis = {
+    client: {
+      port: 6379, // Redis port
+      host: '192.168.1.128', // Redis host
+      password: '123456',
+      db: 0,
+    },
+  };
 
   // config.mongoose = {
   //   url: 'mongodb://localhost:27017/train',

+ 1 - 1
config/config.prod.js

@@ -9,7 +9,7 @@ module.exports = () => {
   };
   // 导出配置
   config.cdn = {
-    repos_root_path: '/usr/local/workspace/service-file/upload',
+    repos_root_path: '/usr/local/workspace/service/service-file/upload',
     repos_root_url_excel: '/excel/',
     repos_root_url_experience: '/experience/',
     repos_root_url_zip: '/zip/',