Skip to content

Commit

Permalink
ops: allow React routing
Browse files Browse the repository at this point in the history
  • Loading branch information
kerberizer committed Dec 5, 2024
1 parent 1696203 commit b077a91
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,14 @@ COPY ./public /tmp/public
COPY ./src /tmp/src

RUN npm install
#RUN npm run lint
RUN npm run build-docker


FROM nginx:mainline

# Allow React routing.
RUN sed -Ei \
'/\s*location\s+\/\s+\{\s*$/a \ try_files $uri /index.html;' \
/etc/nginx/conf.d/default.conf

COPY --from=requirements-stage /tmp/dist /usr/share/nginx/html

0 comments on commit b077a91

Please sign in to comment.