fix: redirect all URI to index page (#68)
This commit is contained in:
Родитель
38c8be0a8d
Коммит
477e084bea
|
@ -24,5 +24,7 @@ WORKDIR /usr/src/app
|
|||
|
||||
COPY --from=build /usr/src/app/run.sh .
|
||||
COPY --from=build /usr/src/app/build /usr/share/nginx/html
|
||||
RUN rm /etc/nginx/conf.d/default.conf
|
||||
COPY --from=build /usr/src/app/nginx.conf /etc/nginx/conf.d/nginx.conf
|
||||
EXPOSE 80
|
||||
ENTRYPOINT [ "./run.sh" ]
|
|
@ -9,5 +9,7 @@ FROM nginx:1.16.0-alpine
|
|||
WORKDIR /usr/src/app
|
||||
COPY --from=build /usr/src/app/run.sh .
|
||||
COPY --from=build /usr/src/app/build /usr/share/nginx/html
|
||||
RUN rm /etc/nginx/conf.d/default.conf
|
||||
COPY --from=build /usr/src/app/nginx.conf /etc/nginx/conf.d/nginx.conf
|
||||
EXPOSE 80
|
||||
ENTRYPOINT [ "./run.sh" ]
|
|
@ -0,0 +1,15 @@
|
|||
server {
|
||||
listen 80;
|
||||
server_name localhost;
|
||||
|
||||
location / {
|
||||
root /usr/share/nginx/html;
|
||||
index index.html;
|
||||
try_files $uri /index.html;
|
||||
}
|
||||
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
location = /50x.html {
|
||||
root /usr/share/nginx/html;
|
||||
}
|
||||
}
|
Загрузка…
Ссылка в новой задаче