First commit
This commit is contained in:
+22
@@ -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/"]
|
||||
Reference in New Issue
Block a user