作者 yangfu

k8s config

@@ -5,7 +5,7 @@ ENV GO111MODULE on @@ -5,7 +5,7 @@ ENV GO111MODULE on
5 5
6 RUN git clone http://gitlab.fjmaimaimai.com/mmm-go/gocomm.git /app/gocomm 6 RUN git clone http://gitlab.fjmaimaimai.com/mmm-go/gocomm.git /app/gocomm
7 7
8 -WORKDIR /app/ability 8 +WORKDIR /app/opp
9 9
10 COPY go.mod . 10 COPY go.mod .
11 COPY go.sum . 11 COPY go.sum .
@@ -13,7 +13,7 @@ RUN go mod download @@ -13,7 +13,7 @@ RUN go mod download
13 13
14 COPY . . 14 COPY . .
15 15
16 -RUN GOOS=linux CGO_ENABLED=0 go build -ldflags="-s -w" -installsuffix cgo -o ability main.go 16 +RUN GOOS=linux CGO_ENABLED=0 go build -ldflags="-s -w" -installsuffix cgo -o opp main.go
17 17
18 #FROM scratch 18 #FROM scratch
19 FROM alpine:latest 19 FROM alpine:latest
@@ -22,7 +22,7 @@ RUN apk add --no-cache tzdata \ @@ -22,7 +22,7 @@ RUN apk add --no-cache tzdata \
22 && echo "Asia/Shanghai" > /etc/timezone \ 22 && echo "Asia/Shanghai" > /etc/timezone \
23 && rm -rf /var/cache/apk/* /tmp/* /var/tmp/* $HOME/.cache ## 清除缓存 23 && rm -rf /var/cache/apk/* /tmp/* /var/tmp/* $HOME/.cache ## 清除缓存
24 WORKDIR /root/ 24 WORKDIR /root/
25 -COPY --from=builder /app/ability . 25 +COPY --from=builder /app/opp .
26 #RUN ls -l 26 #RUN ls -l
27 -EXPOSE 8080  
28 -CMD ["./ability"]  
  27 +EXPOSE 8082
  28 +CMD ["./opp"]
@@ -81,16 +81,12 @@ spec: @@ -81,16 +81,12 @@ spec:
81 value: "opportunity_dev" 81 value: "opportunity_dev"
82 - name: LOG_LEVEL 82 - name: LOG_LEVEL
83 value: "debug" 83 value: "debug"
84 - - name: ERROR_BASE_CODE  
85 - value: "9"  
86 - - name: ERROR_BASE_CODE_MULTIPLE  
87 - value: "1000"  
88 - name: RUN_MODE 84 - name: RUN_MODE
89 value: "prod" 85 value: "prod"
90 - name: aliyun_logs_suplus 86 - name: aliyun_logs_suplus
91 value: "stdout" 87 value: "stdout"
92 - name: aliyun_logs_access 88 - name: aliyun_logs_access
93 - value: "/opt/logs/app.log" 89 + value: "/opt/logs/opp_app.log"
94 volumes: 90 volumes:
95 - name: accesslogs 91 - name: accesslogs
96 emptyDir: {} 92 emptyDir: {}