Switch to using TwinProduction/gocache for caching service status

This commit is contained in:
TwinProduction
2020-12-30 01:08:20 -05:00
parent 1209c477df
commit 641c2029f7
47 changed files with 6993 additions and 18 deletions

20
vendor/github.com/TwinProduction/gocache/Dockerfile generated vendored Normal file
View File

@ -0,0 +1,20 @@
# Build the go application into a binary
FROM golang:alpine as builder
WORKDIR /app
ADD . ./
RUN CGO_ENABLED=0 GOOS=linux go build -mod vendor -a -installsuffix cgo -o bin/gocache-server ./gocacheserver/main
RUN apk --update add --no-cache ca-certificates
FROM scratch
ENV APP_HOME=/app
ENV APP_DATA=/app/data
ENV PORT=6379
ENV MAX_CACHE_SIZE=100000
ENV MAX_MEMORY_USAGE=0
ENV AUTOSAVE="false"
VOLUME ${APP_DATA}
WORKDIR ${APP_HOME}
COPY --from=builder /app/bin/gocache-server ./bin/gocache-server
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
EXPOSE ${PORT}
ENTRYPOINT ["/app/bin/gocache-server"]