From 5ba2337ad554129e7aba6fddf1147883de99f7ab Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Mon, 28 Mar 2022 14:24:43 +0530 Subject: [PATCH] Fix View does not work via building from Dockerfile #713 --- Dockerfile | 1 + nginx.conf | 9 +++++++++ 2 files changed, 10 insertions(+) create mode 100644 nginx.conf diff --git a/Dockerfile b/Dockerfile index 750304776a..cd0ed700d9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,4 +13,5 @@ RUN yarn install RUN yarn build FROM nginx:alpine as mermaid-live-editor-runner +COPY ./nginx.conf /etc/nginx/conf.d/default.conf COPY --from=mermaid-live-editor-builder --chown=nginx:nginx /home/docs /usr/share/nginx/html diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 0000000000..dd830603ea --- /dev/null +++ b/nginx.conf @@ -0,0 +1,9 @@ +server { + listen 80; + server_name mermaid; + location / { + root /usr/share/nginx/html; + # Fallback to index.html for other paths + try_files $uri /index.html; + } +} \ No newline at end of file