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

[Marquez Web] Possible to set base path for static resources? #2793

Open
devvvver opened this issue Apr 3, 2024 · 4 comments
Open

[Marquez Web] Possible to set base path for static resources? #2793

devvvver opened this issue Apr 3, 2024 · 4 comments

Comments

@devvvver
Copy link

devvvver commented Apr 3, 2024

Hi,

We are trying to get Marquez Web running behind a reverse proxy using Traefik. In essence we have the following setup:

  • A Marquez Web container running on our Docker Swarm cluster
  • We use Traefik path prefix to route traffic that comes in via ourdomain.com/marquez to this container

The issue is loading the bundle.js file. When we goto ourdomain.com/marquez it loads the index.html but then it cannot load the bundle.js file because it’s requested via src=“./bundle.js” so it sends a request to ourdomain.com/bundle.js. However, it should actually include the Marquez prefix, so: ourdomain.com/marquez/bundle.js.

We can of course change the index.html so it gets the bundle.js file from marquez/bundle.js but also in the bundle.js itself there are references to static resources using a relative path. Also, this requires us to rebuild the image.

We were wondering whether it is possible to set the base path for static resources via an ENV variable or something (i.e., without having to rebuild the image)? Or is there another way to circumvent this issue that we might have overlooked?

Thanks!

Copy link

boring-cyborg bot commented Apr 3, 2024

Thanks for opening your first issue in the Marquez project! Please be sure to follow the issue template!

@fangxingli
Copy link

➕1

@devvvver
Copy link
Author

devvvver commented Apr 25, 2024

Not a solution but more of a workaround. We decided to route the traffic via a subdomain instead of the path prefix. So marquez.ourdomain.com. This solves the issue regarding getting the bundle.js and the dependencies defined therein.

However, depending on your setup you have to change DNS settings etc. So I would still say that having the possibility to set a base_path or base_url could be very useful.

@phixMe
Copy link
Member

phixMe commented Jun 6, 2024

Hmm, I don't quite have a setup like this, is this something somebody could possibly contribute and add to a webpack? I'd be happy to review and merge it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants