Initial commit

This commit is contained in:
2021-12-03 23:04:09 +01:00
commit 85fd8de5cb
21 changed files with 1681 additions and 0 deletions

21
Dockerfile Normal file
View File

@@ -0,0 +1,21 @@
FROM golang:latest as builder-base
WORKDIR /app
COPY go.mod /app/go.mod
COPY go.sum /app/go.sum
RUN go mod download
COPY . /app
RUN CGO_ENABLED=0 go build -tags allcerts -o ezshare cmd/ezshare.go
FROM builder-base as certs
VOLUME ["/data"]
CMD ["/app/scripts/gencerts.sh"]
FROM builder-base as cross-compiler
VOLUME ["/data"]
CMD ["/app/scripts/cross-compile.sh"]
FROM alpine:latest
COPY --from=builder-base /app/ezshare /usr/bin/ezshare
EXPOSE 50051
EXPOSE 8088
CMD ["/usr/bin/ezshare", "serve"]