From 3c56df2d3821e32df48643146040c1b62ebf95bb Mon Sep 17 00:00:00 2001 From: Perflyst Date: Fri, 22 Jan 2021 13:27:23 +0100 Subject: [PATCH] Fix nginx root location Only index.html is accessed, no real subfolders --- Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Dockerfile b/Dockerfile index e9318a6..6f4a3c9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,4 +5,6 @@ RUN npm install RUN npm run build FROM nginx:alpine as app +# fix nginx root location +RUN sed -i 's|index index.html index.htm;|try_files $uri /index.html;|g' /etc/nginx/conf.d/default.conf COPY --from=build /app/build/ /usr/share/nginx/html/