Skip to content
Snippets Groups Projects
Commit 752c1a1b authored by L4168's avatar L4168
Browse files

add nginx config for react-router

parent 85460601
No related branches found
No related tags found
2 merge requests!46Development to testing,!33Game replay
...@@ -10,5 +10,6 @@ RUN npm run build ...@@ -10,5 +10,6 @@ RUN npm run build
# production environment # production environment
FROM nginx:1.16.0-alpine FROM nginx:1.16.0-alpine
COPY --from=build /usr/src/app/build /usr/share/nginx/html COPY --from=build /usr/src/app/build /usr/share/nginx/html
COPY default.conf /etc/nginx/conf.d/default.conf
EXPOSE 80 EXPOSE 80
CMD ["nginx", "-g", "daemon off;"] CMD ["nginx", "-g", "daemon off;"]
server {
listen 80;
server_name localhost;
location / {
try_files $uri /index.html;
root /usr/share/nginx/html;
index index.html index.htm;
}
error_page 500 502 503 504 /50x.html;
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment