404 error in react project I published with caprover

171 Views Asked by At

When we publish a react project on caprover, it gives 404 error when refreshing the page. my caprover nginx settings are default. My dockerfile is like this

WORKDIR /app
COPY . .
RUN yarn install
RUN yarn build

ENV NODE_ENV production

EXPOSE 3000
CMD [ "npx", "serve", "build" ]
0

There are 0 best solutions below