2020-06-05 23:28:43 +03:00
|
|
|
FROM node:12 AS build
|
2020-02-04 00:31:46 +03:00
|
|
|
WORKDIR /usr/src/app
|
|
|
|
ENV PATH /usr/src/app/node_modules/.bin:$PATH
|
|
|
|
COPY package*.json ./
|
2020-06-05 23:28:43 +03:00
|
|
|
COPY yarn.lock ./
|
|
|
|
RUN yarn install
|
2020-02-04 00:31:46 +03:00
|
|
|
COPY . .
|
2020-06-05 23:28:43 +03:00
|
|
|
RUN yarn build
|
2020-05-13 05:03:20 +03:00
|
|
|
FROM nginx:1.18.0-alpine
|
2020-02-04 00:31:46 +03:00
|
|
|
WORKDIR /usr/src/app
|
|
|
|
COPY --from=build /usr/src/app/run.sh .
|
|
|
|
COPY --from=build /usr/src/app/build /usr/share/nginx/html
|
2020-02-26 00:56:56 +03:00
|
|
|
RUN rm /etc/nginx/conf.d/default.conf
|
|
|
|
COPY --from=build /usr/src/app/nginx.conf /etc/nginx/conf.d/nginx.conf
|
2020-02-04 00:31:46 +03:00
|
|
|
EXPOSE 80
|
|
|
|
ENTRYPOINT [ "./run.sh" ]
|