作者 陈志颖

feat:启用https

@@ -11,7 +11,7 @@ ENV GO111MODULE on @@ -11,7 +11,7 @@ ENV GO111MODULE on
11 ENV GOPROXY https://goproxy.cn,direct 11 ENV GOPROXY https://goproxy.cn,direct
12 RUN ["go","mod","tidy"] 12 RUN ["go","mod","tidy"]
13 RUN ["go","build"] 13 RUN ["go","build"]
14 -EXPOSE 8082 14 +EXPOSE 8082 443
15 ENTRYPOINT ["./partner"] 15 ENTRYPOINT ["./partner"]
16 16
17 ############################# 17 #############################
@@ -2,6 +2,12 @@ appname = partner @@ -2,6 +2,12 @@ appname = partner
2 runmode = "${RUN_MODE||dev}" 2 runmode = "${RUN_MODE||dev}"
3 httpport = "${HTTP_PORT||8082}" 3 httpport = "${HTTP_PORT||8082}"
4 4
  5 +#开启https
  6 +EnableHTTPS = true
  7 +HTTPSPort = "443"
  8 +HTTPSCertFile = "conf/_.fjmaimaimai.com_bundle.crt"
  9 +HTTPSKeyFile = "conf/_.fjmaimaimai.com.key"
  10 +
5 #开启监控 11 #开启监控
6 EnableAdmin = false 12 EnableAdmin = false
7 #开启JSON请求 13 #开启JSON请求
@@ -10,6 +10,9 @@ spec: @@ -10,6 +10,9 @@ spec:
10 - name: "http" 10 - name: "http"
11 port: 80 11 port: 80
12 targetPort: 8082 12 targetPort: 8082
  13 + - name: "https"
  14 + port: 443
  15 + targetPort: 443
13 selector: 16 selector:
14 k8s-app: mmmpartner 17 k8s-app: mmmpartner
15 --- 18 ---
@@ -48,6 +51,7 @@ spec: @@ -48,6 +51,7 @@ spec:
48 imagePullPolicy: Always 51 imagePullPolicy: Always
49 ports: 52 ports:
50 - containerPort: 8082 53 - containerPort: 8082
  54 + - containerPort: 443
51 volumeMounts: 55 volumeMounts:
52 - mountPath: /opt/logs 56 - mountPath: /opt/logs
53 name: accesslogs 57 name: accesslogs
@@ -10,6 +10,9 @@ spec: @@ -10,6 +10,9 @@ spec:
10 - name: "http" 10 - name: "http"
11 port: 80 11 port: 80
12 targetPort: 8082 12 targetPort: 8082
  13 + - name: "https"
  14 + port: 443
  15 + targetPort: 443
13 selector: 16 selector:
14 k8s-app: partner 17 k8s-app: partner
15 --- 18 ---
@@ -48,6 +51,7 @@ spec: @@ -48,6 +51,7 @@ spec:
48 imagePullPolicy: Always 51 imagePullPolicy: Always
49 ports: 52 ports:
50 - containerPort: 8082 53 - containerPort: 8082
  54 + - containerPort: 443
51 volumeMounts: 55 volumeMounts:
52 - mountPath: /opt/logs 56 - mountPath: /opt/logs
53 name: accesslogs 57 name: accesslogs
@@ -10,6 +10,9 @@ spec: @@ -10,6 +10,9 @@ spec:
10 - name: "http" 10 - name: "http"
11 port: 80 11 port: 80
12 targetPort: 8082 12 targetPort: 8082
  13 + - name: "https"
  14 + port: 443
  15 + targetPort: 443
13 selector: 16 selector:
14 k8s-app: mmmpartner 17 k8s-app: mmmpartner
15 --- 18 ---
@@ -48,6 +51,7 @@ spec: @@ -48,6 +51,7 @@ spec:
48 imagePullPolicy: Always 51 imagePullPolicy: Always
49 ports: 52 ports:
50 - containerPort: 8082 53 - containerPort: 8082
  54 + - containerPort: 443
51 volumeMounts: 55 volumeMounts:
52 - mountPath: /opt/logs 56 - mountPath: /opt/logs
53 name: accesslogs 57 name: accesslogs
  1 +version: v1
  2 +kind: Attribute
  3 +metadata:
  4 + name: companyId
  5 + description: 公司id
  6 + type:
  7 + primitive: int64
  1 +version: v1
  2 +kind: Attribute
  3 +metadata:
  4 + name: deliveryCode
  5 + description: 交货编号
  6 + type:
  7 + primitive: string
  1 +version: v1
  2 +kind: Attribute
  3 +metadata:
  4 + name: orderCode
  5 + description: 订单编号
  6 + type:
  7 + primitive: string
  1 +version: v1
  2 +kind: Attribute
  3 +metadata:
  4 + name: orderType
  5 + description: 公司id
  6 + type:
  7 + primitive: int
  1 +version: v1
  2 +kind: Attribute
  3 +metadata:
  4 + name: partnerId
  5 + description: 订单对应的合伙人
  6 + type:
  7 + primitive: int64
  1 +version: v1
  2 +kind: Attribute
  3 +metadata:
  4 + name: salesmanBonusPercent
  5 + description: 业务员抽成比例
  6 + type:
  7 + primitive: float64