2019-07-26 18:59:22 +03:00
|
|
|
# Builder
|
2021-11-15 23:35:23 +03:00
|
|
|
FROM node:lts as builder
|
2019-07-26 18:59:22 +03:00
|
|
|
|
2022-05-23 15:06:04 +03:00
|
|
|
ARG REACT_APP_SERVER
|
|
|
|
|
2019-07-26 18:59:22 +03:00
|
|
|
WORKDIR /src
|
|
|
|
|
|
|
|
COPY . /src
|
2023-01-27 10:34:24 +03:00
|
|
|
RUN yarn --network-timeout=300000 install
|
2023-02-04 00:17:08 +03:00
|
|
|
RUN REACT_APP_SERVER=$REACT_APP_SERVER yarn build
|
2019-07-26 18:59:22 +03:00
|
|
|
|
|
|
|
|
|
|
|
# App
|
|
|
|
FROM nginx:alpine
|
|
|
|
|
|
|
|
COPY --from=builder /src/build /app
|
|
|
|
|
|
|
|
RUN rm -rf /usr/share/nginx/html \
|
|
|
|
&& ln -s /app /usr/share/nginx/html
|