Plan stuff. Log stuff.
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.

21 lines
587 B

4 years ago
  1. # 1. Backend
  2. FROM golang:1.13 AS build-backend
  3. COPY . /project
  4. WORKDIR /project
  5. RUN go get
  6. RUN CGO_ENABLED=0 go build -ldflags "-w -s" .
  7. # 2. Frontend
  8. FROM node:10-alpine AS build-frontend
  9. COPY svelte-ui /project
  10. WORKDIR project
  11. RUN npm install
  12. RUN npm run build
  13. # 3. Release
  14. FROM alpine:3.9.5 AS release
  15. RUN apk add --no-cache ca-certificates
  16. COPY --from=build-backend /project/stufflog /usr/local/bin/stufflog
  17. COPY --from=build-frontend /project/public /usr/share/stufflog-ui
  18. CMD ["/usr/local/bin/stufflog", "-conf", "/etc/stufflog/stufflog.yaml", "-ui", "/usr/share/stufflog-ui/"]