Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hosting under subpath #1143

Closed
gannaramu opened this issue Jan 25, 2023 · 2 comments
Closed

Hosting under subpath #1143

gannaramu opened this issue Jan 25, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@gannaramu
Copy link

gannaramu commented Jan 25, 2023

Describe the bug
A clear and concise description of what the bug is.
when we try to host the app under a subpath. localhost:8000/mermaid-live-editor the app makes a requests to the app makes a request to http://localhost:8000/_app/version.json
To Reproduce

Nginx.conf:

server { 
 listen 80;
 server_name mermaid;
 location /mermaid-live-editor {
   alias /usr/share/nginx/html;
   index  index.html;
	 # Fallback to index.html for other paths
   try_files $uri /index.html;
 }
}

new docker file:

FROM ghcr.io/mermaid-js/mermaid-live-editor
COPY ./nginx.conf /etc/nginx/conf.d/default.conf

Link to Live Editor:
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
would be nice to have a docker image that we can host on a subpath.

Screenshots
If applicable, add screenshots to help explain your problem.
image

Desktop (please complete the following information):

  • OS: macos
  • Browser: Chrome
  • Version Version 109.0.5414.87 (Official Build) (arm64)

Additional context
Add any other context about the problem here.

@gannaramu gannaramu added the bug Something isn't working label Jan 25, 2023
@gannaramu
Copy link
Author

might be related to this sveltejs/kit#8091

@sidharthv96
Copy link
Member

https://mermaid-js.github.io/mermaid-live-editor/ does work.
If you add an ENV var DEPLOY as true before building, svelte's config should pick it up and add a base path mermaid-live-editor

paths: process.env['DEPLOY']
? {
base: `/mermaid-live-editor`
}
: {}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants