🔊 v0.3.0 计划任务(定期备份等场景)

This commit is contained in:
naiba
2021-01-19 09:59:04 +08:00
parent f20a501ab4
commit d7a3ba607b
24 changed files with 417 additions and 38 deletions

21
Dockerfile Normal file
View File

@@ -0,0 +1,21 @@
FROM golang:alpine AS binarybuilder
RUN apk --no-cache --no-progress add \
gcc git musl-dev
WORKDIR /dashboard
COPY . .
RUN cd cmd/dashboard && go build -o app -ldflags="-s -w"
FROM alpine:latest
ENV TZ="Asia/Shanghai"
RUN apk --no-cache --no-progress add \
ca-certificates \
tzdata && \
cp "/usr/share/zoneinfo/$TZ" /etc/localtime && \
echo "$TZ" > /etc/timezone
WORKDIR /dashboard
COPY ./resource ./resource
COPY --from=binarybuilder /dashboard/cmd/dashboard/app ./app
VOLUME ["/dashboard/data"]
EXPOSE 80 5555
CMD ["/dashboard/app"]