diff --git a/Dockerfile b/Dockerfile index 75030477..cd0ed700 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 00000000..dd830603 --- /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