marquez icon indicating copy to clipboard operation
marquez copied to clipboard

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

Open devvvver opened this issue 11 months ago • 4 comments

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!

devvvver avatar Apr 03 '24 14:04 devvvver

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

boring-cyborg[bot] avatar Apr 03 '24 14:04 boring-cyborg[bot]

➕1

fangxingli avatar Apr 25 '24 08:04 fangxingli

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.

devvvver avatar Apr 25 '24 10:04 devvvver

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.

phixMe avatar Jun 06 '24 03:06 phixMe