2021-08-17 11:32:15 +03:00
|
|
|
FROM node:lts-alpine as build-front
|
2021-11-13 14:03:35 +03:00
|
|
|
|
2021-08-17 11:32:15 +03:00
|
|
|
RUN apk add --no-cache curl
|
2021-11-13 14:03:35 +03:00
|
|
|
|
2021-08-17 11:32:15 +03:00
|
|
|
WORKDIR /app
|
2021-11-13 14:03:35 +03:00
|
|
|
|
2021-08-17 11:32:15 +03:00
|
|
|
COPY ./client .
|
2021-11-13 14:03:35 +03:00
|
|
|
|
2021-08-17 11:32:15 +03:00
|
|
|
RUN npm install --production \
|
|
|
|
&& npm run build
|
|
|
|
|
|
|
|
FROM node:lts-alpine
|
2021-11-13 14:03:35 +03:00
|
|
|
|
2021-08-17 11:32:15 +03:00
|
|
|
WORKDIR /app
|
2021-11-13 14:03:35 +03:00
|
|
|
|
2021-08-17 11:32:15 +03:00
|
|
|
RUN mkdir -p ./public
|
2021-11-13 14:03:35 +03:00
|
|
|
|
2021-08-17 11:32:15 +03:00
|
|
|
COPY --from=build-front /app/build/ ./public
|
|
|
|
|
|
|
|
COPY package*.json ./
|
2021-11-13 14:03:35 +03:00
|
|
|
|
2021-08-17 11:32:15 +03:00
|
|
|
RUN npm install
|
2021-11-13 14:03:35 +03:00
|
|
|
|
2021-08-17 11:32:15 +03:00
|
|
|
COPY . .
|
2021-11-13 14:03:35 +03:00
|
|
|
|
|
|
|
CMD ["npm", "run", "skaffold"]
|