-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
45 lines (40 loc) · 1.21 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
FROM golang:alpine as build
RUN apk add --no-cache --update git
ADD . /go/src/app
WORKDIR /go/src/app
RUN go get ./...
RUN go build \
-a -tags timetzdata \
-o vg \
-ldflags="-s -w -X 'github.com/arelate/vangogh/cli.GitTag=`git describe --tags --abbrev=0`'" \
main.go
FROM alpine:latest
COPY --from=build /go/src/app/vg /usr/bin/vg
COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
EXPOSE 1853
# cold storage is less frequently accessed data,
# that can be stored on hibernating HDD.
# hot storage is frequently accessed data,
# that can benefit from being stored on SSD.
# backups (cold storage)
VOLUME /var/lib/vangogh/backups
# downloads (cold storage)
VOLUME /var/lib/vangogh/downloads
# checksums (hot storage)
VOLUME /var/lib/vangogh/checksums
# images (hot storage)
VOLUME /var/lib/vangogh/images
# input (hot storage)
VOLUME /var/lib/vangogh/input
# items (hot storage)
VOLUME /var/lib/vangogh/items
# logs (cold storage)
VOLUME /var/log/vangogh
# metadata (hot storage)
VOLUME /var/lib/vangogh/metadata
# output (hot storage)
VOLUME /var/lib/vangogh/output
# recycle_bin (cold storage)
VOLUME /var/lib/vangogh/recycle_bin
ENTRYPOINT ["/usr/bin/vg"]
CMD ["serve","-port", "1853", "-stderr"]