-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile.combined
34 lines (25 loc) · 729 Bytes
/
Dockerfile.combined
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
FROM node:14.4 as build-frontend
WORKDIR /app
COPY ./client/package.json ./client/package-lock.json ./
RUN npm ci --no-progress
COPY ./client/*.* ./
COPY ./client/src ./src
COPY ./client/public ./public
RUN npm run build
FROM golang:1.14.4 as build-backend
WORKDIR $GOPATH/src/github.com/s-matyukevich/belarus-civil-rights-support
COPY ./src ./src
COPY ./main.go .
COPY ./go.mod .
COPY ./go.sum .
RUN go install .
FROM ubuntu
WORKDIR /app
RUN apt-get update
RUN apt-get install ca-certificates -y
COPY --from=build-frontend /app/build /app/static
COPY --from=build-backend /go/bin/belarus-civil-rights-support /app/app
COPY ./static/images /app/static/images
COPY ./templates /app/templates
ENTRYPOINT /app/app
EXPOSE 80