作者 yangfu

k8s config

... ... @@ -5,7 +5,7 @@ ENV GO111MODULE on
RUN git clone http://gitlab.fjmaimaimai.com/mmm-go/gocomm.git /app/gocomm
WORKDIR /app/ability
WORKDIR /app/opp
COPY go.mod .
COPY go.sum .
... ... @@ -13,7 +13,7 @@ RUN go mod download
COPY . .
RUN GOOS=linux CGO_ENABLED=0 go build -ldflags="-s -w" -installsuffix cgo -o ability main.go
RUN GOOS=linux CGO_ENABLED=0 go build -ldflags="-s -w" -installsuffix cgo -o opp main.go
#FROM scratch
FROM alpine:latest
... ... @@ -22,7 +22,7 @@ RUN apk add --no-cache tzdata \
&& echo "Asia/Shanghai" > /etc/timezone \
&& rm -rf /var/cache/apk/* /tmp/* /var/tmp/* $HOME/.cache ## 清除缓存
WORKDIR /root/
COPY --from=builder /app/ability .
COPY --from=builder /app/opp .
#RUN ls -l
EXPOSE 8080
CMD ["./ability"]
\ No newline at end of file
EXPOSE 8082
CMD ["./opp"]
\ No newline at end of file
... ...
... ... @@ -81,16 +81,12 @@ spec:
value: "opportunity_dev"
- name: LOG_LEVEL
value: "debug"
- name: ERROR_BASE_CODE
value: "9"
- name: ERROR_BASE_CODE_MULTIPLE
value: "1000"
- name: RUN_MODE
value: "prod"
- name: aliyun_logs_suplus
value: "stdout"
- name: aliyun_logs_access
value: "/opt/logs/app.log"
value: "/opt/logs/opp_app.log"
volumes:
- name: accesslogs
emptyDir: {}
\ No newline at end of file
... ...