作者 yangfu

配置修改

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