Your issue
We’re getting errors in production that say that our react bundles couldn’t be found
The javascript console spits out the above error, which disappears when we refresh the page. We only see these issues loading pages after deploys (doesn’t happen incognito). My best guess is that there’s some caching issue with our webpack bundles that’s causing the app to search for an old file / not find an existing one.
Dockerfile content (if any)
FROM node:16-alpine3.11 as build
WORKDIR /app
ENV PATH /app/node_modules/.bin:$PATH
ARG REACT_APP_API_URL
ENV REACT_APP_API_URL=$REACT_APP_API_URL
COPY package.json ./
COPY yarn.lock ./
RUN yarn
COPY . ./
RUN yarn build
# production environment
FROM nginx:stable-alpine as production
RUN rm /etc/nginx/conf.d/default.conf
COPY conf.d/default.conf /etc/nginx/conf.d
COPY --from=build /app/build /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]