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

Commit

Permalink
Merge pull request #10 from innonymous/dev
Browse files Browse the repository at this point in the history
Fix 404 nginx
  • Loading branch information
smthngslv authored Oct 9, 2021
2 parents 9966d9d + 299fda6 commit d3af4df
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 d3af4df

Please sign in to comment.