作者 yangfu

配置修改

@@ -14,17 +14,17 @@ RUN go mod download @@ -14,17 +14,17 @@ RUN go mod download
14 14
15 COPY . . 15 COPY . .
16 RUN GOOS=linux CGO_ENABLED=0 go build -ldflags="-s -w" -installsuffix cgo -o opp main.go 16 RUN GOOS=linux CGO_ENABLED=0 go build -ldflags="-s -w" -installsuffix cgo -o opp main.go
17 -EXPOSE 8080  
18 -CMD ["./opp"] 17 +#EXPOSE 8080
  18 +#CMD ["./opp"]
19 19
20 -#FROM alpine:latest 20 +FROM alpine:latest
21 21
22 -#RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories  
23 -#RUN apk add --no-cache tzdata \  
24 -# && ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \  
25 -# && echo "Asia/Shanghai" > /etc/timezone \  
26 -## && rm -rf /var/cache/apk/* /tmp/* /var/tmp/* $HOME/.cache ## 清除缓存  
27 -#WORKDIR /root/  
28 -#COPY --from=builder /go/src/opp .  
29 -#EXPOSE 8080  
30 -#CMD ["./opp"]  
  22 +RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
  23 +RUN apk add --no-cache tzdata \
  24 + && ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
  25 + && echo "Asia/Shanghai" > /etc/timezone \
  26 +# && rm -rf /var/cache/apk/* /tmp/* /var/tmp/* $HOME/.cache ## 清除缓存
  27 +WORKDIR /root/
  28 +COPY --from=builder /go/src/opp .
  29 +EXPOSE 8080
  30 +CMD ["./opp"]
@@ -12,8 +12,8 @@ aliyun_logs_access ="${aliyun_logs_access||app.log}" @@ -12,8 +12,8 @@ aliyun_logs_access ="${aliyun_logs_access||app.log}"
12 12
13 13
14 #redis相关配置 14 #redis相关配置
15 -redis_add = "${REDIS_HOST||192.168.0.247}"  
16 -redis_add_port = "${REDIS_PORT||30379}" 15 +redis_add = "${REDIS_HOST||127.0.0.1}"
  16 +redis_add_port = "${REDIS_PORT||6379}"
17 redis_auth = "" 17 redis_auth = ""
18 18
19 #sms相关配置 19 #sms相关配置