From 6688fafeaa442db1da80eaad709cb37893849840 Mon Sep 17 00:00:00 2001 From: FireMasterK <20838718+FireMasterK@users.noreply.github.com> Date: Fri, 20 Aug 2021 21:40:37 +0530 Subject: [PATCH] Fix for 404s on frontend. --- Dockerfile | 1 + docker/nginx.conf | 12 ++++++++++++ 2 files changed, 13 insertions(+) create mode 100644 docker/nginx.conf diff --git a/Dockerfile b/Dockerfile index df2e5696..cd0dd282 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,5 +13,6 @@ RUN yarn build && sed -i 's/fonts.gstatic.com/fonts.kavin.rocks/g' dist/css/*.cs FROM nginx:alpine COPY --from=build /app/dist/ /usr/share/nginx/html/ +COPY docker/nginx.conf /etc/nginx/conf.d/default.conf EXPOSE 80 diff --git a/docker/nginx.conf b/docker/nginx.conf new file mode 100644 index 00000000..59ee3c26 --- /dev/null +++ b/docker/nginx.conf @@ -0,0 +1,12 @@ +server { + listen 80; + listen [::]:80; + server_name localhost; + + location / { + root /usr/share/nginx/html; + index index.html index.htm; + } + + error_page 404 =200 /index.html; +}