From 8da9d76acf499afb6102c4ce313949daa45becb9 Mon Sep 17 00:00:00 2001 From: Niggl Date: Wed, 10 Jun 2020 13:04:56 +0200 Subject: [PATCH] Added Workaround for the routing problem --- Dockerfile | 1 + nginx.conf | 8 ++++++++ 2 files changed, 9 insertions(+) create mode 100644 nginx.conf diff --git a/Dockerfile b/Dockerfile index c29977f..2bccf44 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,4 +16,5 @@ RUN npm run build FROM nginx:alpine AS final ENV API_URL "http://localhost:5001" COPY --from=build /build/dist/frontend /usr/share/nginx/html +COPY nginx.conf /etc/nginx/nginx.conf CMD ["/bin/sh", "-c", "envsubst < /usr/share/nginx/html/assets/env.template.js > /usr/share/nginx/html/assets/env.js && exec nginx -g 'daemon off;'"] \ No newline at end of file diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 0000000..519e56f --- /dev/null +++ b/nginx.conf @@ -0,0 +1,8 @@ +server { + listen 80; + location / { + root /usr/share/nginx/html; + index index.html index.htm; + try_files $uri $uri/ /index.html =404; + } +}