Browse Source

update: 初步分离部署阶段和上线阶段。
1. 部署阶段配置文件中云主机的IP地址和端口
2. 上线阶段配置文件中云主机的域名地址(默认80端口)

Junling Bu 7 years ago
parent
commit
8e81093afb

+ 28 - 0
litemall-admin-api/src/main/resources/application-dep.properties

@@ -0,0 +1,28 @@
+pagehelper.helperDialect=mysql
+pagehelper.reasonable=true
+pagehelper.supportMethodsArguments=true
+pagehelper.params=count=countSql
+
+spring.datasource.druid.url=jdbc:mysql://localhost:3306/litemall?useUnicode=true&characterEncoding=UTF-8&serverTimezone=UTC&verifyServerCertificate=false&useSSL=false
+spring.datasource.druid.driver-class-name=com.mysql.jdbc.Driver
+spring.datasource.druid.username=litemall
+spring.datasource.druid.password=litemall123456
+spring.datasource.druid.initial-size=50
+spring.datasource.druid.max-active=100
+spring.datasource.druid.min-idle=20
+spring.datasource.druid.max-wait=60000
+spring.datasource.druid.pool-prepared-statements=true
+spring.datasource.druid.max-pool-prepared-statement-per-connection-size=20
+spring.datasource.druid.validation-query=SELECT 1 FROM DUAL
+spring.datasource.druid.test-on-borrow=false
+spring.datasource.druid.test-on-return=false
+spring.datasource.druid.test-while-idle=true
+spring.datasource.druid.time-between-eviction-runs-millis=60000
+spring.datasource.druid.filters=stat,wall,log4j
+
+
+logging.level.root=ERROR
+logging.level.org.springframework=ERROR
+logging.level.org.mybatis=ERROR
+logging.level.org.linlinjava.litemall.db=ERROR
+logging.level.org.linlinjava.litemall=DEBUG

+ 6 - 0
litemall-admin/config/dep.env.js

@@ -0,0 +1,6 @@
+module.exports = {
+	NODE_ENV: '"deploy"',
+	ENV_CONFIG: '"dep"',
+    BASE_API: '"http://122.152.206.172:8083/admin"',
+    OS_API: '"http://122.152.206.172:8081/os"'
+}

+ 2 - 2
litemall-admin/config/dev.env.js

@@ -1,6 +1,6 @@
 module.exports = {
 	NODE_ENV: '"development"',
 	ENV_CONFIG: '"dev"',
-  BASE_API: '"http://localhost:8083/admin"',
-  OS_API: '"http://localhost:8081/os"'
+    BASE_API: '"http://localhost:8083/admin"',
+    OS_API: '"http://localhost:8081/os"'
 }

+ 2 - 2
litemall-admin/config/prod.env.js

@@ -1,6 +1,6 @@
 module.exports = {
 	NODE_ENV: '"production"',
 	ENV_CONFIG: '"prod"',
-  BASE_API: '"http://122.152.206.172:8083/admin"',
-  OS_API: '"http://122.152.206.172:8081/os"'
+    BASE_API: '"https://www.example.com/admin"',
+    OS_API: '"https://www.example.com/os"'
 }

+ 1 - 0
litemall-admin/package.json

@@ -7,6 +7,7 @@
   "private": true,
   "scripts": {
     "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js",
+    "build:dep": "cross-env NODE_ENV=production env_config=dep node build/build.js",
     "build:prod": "cross-env NODE_ENV=production env_config=prod node build/build.js",
     "lint": "eslint --ext .js,.vue src",
     "test": "npm run lint"

+ 27 - 0
litemall-all/src/main/resources/application-dep.properties

@@ -0,0 +1,27 @@
+pagehelper.helperDialect=mysql
+pagehelper.reasonable=true
+pagehelper.supportMethodsArguments=true
+pagehelper.params=count=countSql
+
+spring.datasource.druid.url=jdbc:mysql://localhost:3306/litemall?useUnicode=true&characterEncoding=UTF-8&serverTimezone=UTC&verifyServerCertificate=false&useSSL=false
+spring.datasource.druid.driver-class-name=com.mysql.jdbc.Driver
+spring.datasource.druid.username=litemall
+spring.datasource.druid.password=litemall123456
+spring.datasource.druid.initial-size=50
+spring.datasource.druid.max-active=100
+spring.datasource.druid.min-idle=20
+spring.datasource.druid.max-wait=60000
+spring.datasource.druid.pool-prepared-statements=true
+spring.datasource.druid.max-pool-prepared-statement-per-connection-size=20
+spring.datasource.druid.validation-query=SELECT 1 FROM DUAL
+spring.datasource.druid.test-on-borrow=false
+spring.datasource.druid.test-on-return=false
+spring.datasource.druid.test-while-idle=true
+spring.datasource.druid.time-between-eviction-runs-millis=60000
+spring.datasource.druid.filters=stat,wall,log4j
+
+
+logging.level.root=ERROR
+logging.level.org.springframework=ERROR
+logging.level.org.mybatis=ERROR
+logging.level.org.linlinjava.litemall=DEBUG

+ 29 - 0
litemall-db/src/main/resources/application-dep.properties

@@ -0,0 +1,29 @@
+pagehelper.helperDialect=mysql
+pagehelper.reasonable=true
+pagehelper.supportMethodsArguments=true
+pagehelper.params=count=countSql
+
+spring.datasource.druid.url=jdbc:mysql://localhost:3306/litemall?useUnicode=true&characterEncoding=UTF-8&serverTimezone=UTC&verifyServerCertificate=false&useSSL=false
+spring.datasource.druid.driver-class-name=com.mysql.jdbc.Driver
+spring.datasource.druid.username=litemall
+spring.datasource.druid.password=litemall123456
+spring.datasource.druid.initial-size=50
+spring.datasource.druid.max-active=100
+spring.datasource.druid.min-idle=20
+spring.datasource.druid.max-wait=60000
+spring.datasource.druid.pool-prepared-statements=true
+spring.datasource.druid.max-pool-prepared-statement-per-connection-size=20
+spring.datasource.druid.validation-query=SELECT 1 FROM DUAL
+spring.datasource.druid.test-on-borrow=false
+spring.datasource.druid.test-on-return=false
+spring.datasource.druid.test-while-idle=true
+spring.datasource.druid.time-between-eviction-runs-millis=60000
+spring.datasource.druid.filters=stat,wall,log4j
+
+
+logging.level.root=ERROR
+logging.level.org.springframework=ERROR
+logging.level.org.mybatis=ERROR
+logging.level.org.linlinjava.litemall.db=DEBUG
+logging.level.org.linlinjava.litemall=ERROR
+

+ 30 - 0
litemall-os-api/src/main/resources/application-dep.properties

@@ -0,0 +1,30 @@
+pagehelper.helperDialect=mysql
+pagehelper.reasonable=true
+pagehelper.supportMethodsArguments=true
+pagehelper.params=count=countSql
+
+spring.datasource.druid.url=jdbc:mysql://localhost:3306/litemall?useUnicode=true&characterEncoding=UTF-8&serverTimezone=UTC&verifyServerCertificate=false&useSSL=false
+spring.datasource.druid.driver-class-name=com.mysql.jdbc.Driver
+spring.datasource.druid.username=litemall
+spring.datasource.druid.password=litemall123456
+spring.datasource.druid.initial-size=50
+spring.datasource.druid.max-active=100
+spring.datasource.druid.min-idle=20
+spring.datasource.druid.max-wait=60000
+spring.datasource.druid.pool-prepared-statements=true
+spring.datasource.druid.max-pool-prepared-statement-per-connection-size=20
+spring.datasource.druid.validation-query=SELECT 1 FROM DUAL
+spring.datasource.druid.test-on-borrow=false
+spring.datasource.druid.test-on-return=false
+spring.datasource.druid.test-while-idle=true
+spring.datasource.druid.time-between-eviction-runs-millis=60000
+spring.datasource.druid.filters=stat,wall,log4j
+
+logging.level.root=ERROR
+logging.level.org.springframework=ERROR
+logging.level.org.mybatis=ERROR
+logging.level.org.linlinjava.litemall.db=ERROR
+logging.level.org.linlinjava.litemall=ERROR
+
+org.linlinjava.litemall.os.address=122.152.206.172
+org.linlinjava.litemall.os.port=8081

+ 3 - 2
litemall-os-api/src/main/resources/application-prod.properties

@@ -26,5 +26,6 @@ logging.level.org.mybatis=ERROR
 logging.level.org.linlinjava.litemall.db=ERROR
 logging.level.org.linlinjava.litemall=DEBUG
 
-org.linlinjava.litemall.os.address=122.152.206.172
-org.linlinjava.litemall.os.port=8081
+# 开发者应该设置成自己的域名
+org.linlinjava.litemall.os.address=www.example.com
+org.linlinjava.litemall.os.port=80

+ 34 - 0
litemall-wx-api/src/main/resources/application-dep.properties

@@ -0,0 +1,34 @@
+pagehelper.helperDialect=mysql
+pagehelper.reasonable=true
+pagehelper.supportMethodsArguments=true
+pagehelper.params=count=countSql
+
+spring.datasource.druid.url=jdbc:mysql://localhost:3306/litemall?useUnicode=true&characterEncoding=UTF-8&serverTimezone=UTC&verifyServerCertificate=false&useSSL=false
+spring.datasource.druid.driver-class-name=com.mysql.jdbc.Driver
+spring.datasource.druid.username=litemall
+spring.datasource.druid.password=litemall123456
+spring.datasource.druid.initial-size=50
+spring.datasource.druid.max-active=100
+spring.datasource.druid.min-idle=20
+spring.datasource.druid.max-wait=60000
+spring.datasource.druid.pool-prepared-statements=true
+spring.datasource.druid.max-pool-prepared-statement-per-connection-size=20
+spring.datasource.druid.validation-query=SELECT 1 FROM DUAL
+spring.datasource.druid.test-on-borrow=false
+spring.datasource.druid.test-on-return=false
+spring.datasource.druid.test-while-idle=true
+spring.datasource.druid.time-between-eviction-runs-millis=60000
+spring.datasource.druid.filters=stat,wall,log4j
+
+
+logging.level.root=ERROR
+logging.level.org.springframework=ERROR
+logging.level.org.mybatis=ERROR
+logging.level.org.linlinjava.litemall.db=ERROR
+logging.level.org.linlinjava.litemall=DEBUG
+
+wx.app-id=wxa5b486c6b918ecfb
+wx.app-secret=e04004829d4c383b4db7769d88dfbca1
+wx.mch-id=
+wx.mch-key=
+wx.notify-url=

+ 7 - 1
litemall-wx-api/src/main/resources/application-dev.properties

@@ -25,4 +25,10 @@ logging.level.root=ERROR
 logging.level.org.springframework=ERROR
 logging.level.org.mybatis=ERROR
 logging.level.org.linlinjava.litemall.db=ERROR
-logging.level.org.linlinjava.litemall=DEBUG
+logging.level.org.linlinjava.litemall=DEBUG
+
+wx.app-id=wxa5b486c6b918ecfb
+wx.app-secret=e04004829d4c383b4db7769d88dfbca1
+wx.mch-id=
+wx.mch-key=
+wx.notify-url=

+ 8 - 1
litemall-wx-api/src/main/resources/application-prod.properties

@@ -24,4 +24,11 @@ logging.level.root=ERROR
 logging.level.org.springframework=ERROR
 logging.level.org.mybatis=ERROR
 logging.level.org.linlinjava.litemall.db=ERROR
-logging.level.org.linlinjava.litemall=ERROR
+logging.level.org.linlinjava.litemall=ERROR
+
+# 开发者应该设置成自己的wx相关信息
+wx.app-id=wxa5b486c6b918ecfb
+wx.app-secret=e04004829d4c383b4db7769d88dfbca1
+wx.mch-id=
+wx.mch-key=
+wx.notify-url=

+ 4 - 1
litemall-wx/config/api.js

@@ -5,6 +5,8 @@
 // var WxApiRoot = 'http://192.168.0.101:8082/wx/';
 // 云平台部署时使用
  var WxApiRoot = 'http://122.152.206.172:8082/wx/';
+// 云平台上线时使用
+// var WxApiRoot = 'https://www.example.com/wx/';
 
 // 以下是图片存储服务器API地址
 // 本机开发时使用
@@ -13,7 +15,8 @@
 // var StorageApi = 'http://192.168.0.101:8081/os/storage/create';
 // 云平台部署时使用
 var StorageApi = 'http://122.152.206.172:8081/os/storage/create';
-
+// 云平台上线时使用
+// var StorageApi = 'https://www.example.com/os/storage/create';
 
 module.exports = {
     IndexUrl: WxApiRoot + 'home/index', //首页数据接口