You cannot 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
519 B
Docker

FROM node:18 AS frontend-builder
WORKDIR /frontend
COPY ./_frontend .
RUN npm install
RUN npm run build
FROM golang:1.18-alpine AS server-builder
WORKDIR /server
COPY go.mod go.sum ./
RUN go mod download -x
COPY . .
RUN go build -buildvcs=false -o storage-server -v .
FROM alpine:latest AS runner
RUN apk add mdadm
WORKDIR /app
COPY --from=frontend-builder /frontend/dist ./_frontend/dist
COPY ./scripts ./scripts
COPY --from=server-builder /server/storage-server ./storage-server
EXPOSE 4000
CMD ["./storage-server"]