First commit

This commit is contained in:
2020-02-04 18:46:10 +01:00
commit 190e1eb01d
91 changed files with 13411 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
# 1. Backend
FROM golang:1.13 AS build-backend
COPY . /project
WORKDIR /project
RUN go get
RUN CGO_ENABLED=0 go build -ldflags "-w -s" .
# 2. Frontend
FROM node:10-alpine AS build-frontend
COPY svelte-ui /project
WORKDIR project
RUN npm install
RUN npm run build
# 3. Release
FROM alpine:3.9.5 AS release
RUN apk add --no-cache ca-certificates
COPY --from=build-backend /project/stufflog /usr/local/bin/stufflog
COPY --from=build-frontend /project/public /usr/share/stufflog-ui
CMD ["/usr/local/bin/stufflog", "-conf", "/etc/stufflog/stufflog.yaml", "-ui", "/usr/share/stufflog-ui/"]