You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
587 B
22 lines
587 B
# 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/"]
|