Skip to content
This repository has been archived by the owner on May 13, 2023. It is now read-only.

Commit

Permalink
Fix 404 nginx
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivan Izmailov committed Oct 9, 2021
1 parent 419578b commit 299fda6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,6 @@ FROM nginx:stable
COPY --from=build /app/build /usr/share/nginx/html

# This commad setup API_URL.
CMD sed -i "s%API_URL_PLACEHOLDER%${REACT_APP_API_URL}%g" "/usr/share/nginx/html/index.html" && nginx -g "daemon off;"
CMD sed -i "s%index index.html index.htm;%try_files \$uri /index.html;%g" "/etc/nginx/conf.d/default.conf" && \
sed -i "s%API_URL_PLACEHOLDER%${REACT_APP_API_URL}%g" "/usr/share/nginx/html/index.html" && \
nginx -g "daemon off;"

0 comments on commit 299fda6

Please sign in to comment.