2020-07-19 00:28:25 +02:00
|
|
|
FROM node:14.5-alpine as frontend
|
|
|
|
RUN apk --no-cache add curl
|
|
|
|
WORKDIR /usr/src/app
|
|
|
|
COPY frontend .
|
|
|
|
RUN yarn install
|
|
|
|
RUN yarn build
|
|
|
|
|
|
|
|
FROM golang:1.14.5-alpine as backend
|
|
|
|
WORKDIR /usr/src/app
|
2020-07-20 00:25:58 +02:00
|
|
|
COPY go.mod go.mod
|
|
|
|
COPY go.sum go.sum
|
|
|
|
RUN go mod download
|
2020-07-19 00:28:25 +02:00
|
|
|
COPY . .
|
2020-07-20 00:25:58 +02:00
|
|
|
COPY --from=frontend /usr/src/app/build ./frontend/build
|
|
|
|
RUN go run cmd/mage/main.go backend:genFrontend backend:genMigrations backend:build
|
2020-07-19 00:28:25 +02:00
|
|
|
|
|
|
|
FROM alpine:latest
|
|
|
|
WORKDIR /root/
|
2020-08-07 03:50:35 +02:00
|
|
|
COPY --from=backend /usr/src/app/dist/taskcafe .
|
|
|
|
CMD ["./taskcafe", "web"]
|