Fix View does not work via building from Dockerfile #713

This commit is contained in:
Sidharth Vinod
2022-03-28 14:24:43 +05:30
parent 8ab9a6fb87
commit 5ba2337ad5
2 changed files with 10 additions and 0 deletions

View File

@@ -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

9
nginx.conf Normal file
View File

@@ -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;
}
}