2019-07-26 17:59:22 +02:00
|
|
|
# Builder
|
2021-11-15 21:35:23 +01:00
|
|
|
FROM node:lts as builder
|
2019-07-26 17:59:22 +02:00
|
|
|
|
2022-05-23 14:06:04 +02:00
|
|
|
ARG PUBLIC_URL=/
|
|
|
|
ARG REACT_APP_SERVER
|
|
|
|
|
2019-07-26 17:59:22 +02:00
|
|
|
WORKDIR /src
|
|
|
|
|
|
|
|
COPY . /src
|
|
|
|
RUN yarn --network-timeout=100000 install
|
2022-05-23 14:06:04 +02:00
|
|
|
RUN PUBLIC_URL=$PUBLIC_URL REACT_APP_SERVER=$REACT_APP_SERVER yarn build
|
2019-07-26 17:59:22 +02: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
|