PATH_PREFIX doesn't seem to work
staugaard opened this issue · 4 comments
I'm trying to set up River UI behind Traefik and want to use PATH_PREFIX. It does not seem to work.
Here is my compose service:
river-ui:
image: ghcr.io/riverqueue/riverui:latest
environment:
DATABASE_URL: my-postgres-url
PATH_PREFIX: /continent/river
labels:
- traefik.enable=true
- traefik.http.routers.river-ui.rule=Host(`my-domain.com`) && PathPrefix(`/continent/river`)
- traefik.http.routers.river-ui.middlewares=internal-auth@file
- traefik.http.services.river-ui.loadbalancer.server.port=8080
When I open /continent/river
in my browser, I do get the river UI HTML page, but it tries to load assets on the root.
The returned HTML document looks like this:
<!doctype html>
<html lang="en" class="h-full">
<head>
<meta charset="UTF-8" />
<link rel="icon" href="/favicon.ico" type="image/x-icon" sizes="32x32" />
<link rel="icon" href="/icon.svg" type="image/svg+xml" sizes="any" />
<link
rel="apple-touch-icon"
href="/apple-icon.png"
type="image/png"
sizes="512x512"
/>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>River</title>
<script type="module" crossorigin src="/assets/index-BfbmKDfG.js"></script>
<link rel="modulepreload" crossorigin href="/assets/dagrejs-BYkk81-A.js">
<link rel="modulepreload" crossorigin href="/assets/react-dom-BOasIFCf.js">
<link rel="modulepreload" crossorigin href="/assets/reactflow-BySh6Uv9.js">
<link rel="stylesheet" crossorigin href="/assets/index-DVN-ewOD.css">
</head>
<body class="bg-white dark:bg-slate-900 h-full">
<div id="root" class="h-full"></div>
</body>
</html>
What am I doing wrong?
I see from looking at the Dockerfile
that PATH_PREFIX
must be handled at image building time.
It would be great if this could be done at run time.
Definitely agree, been trying to sort out a way to get both Vite and Tanstack Router to cooperate with a dynamic path prefix.
This will be fixed in the upcoming release I'll ship shortly.
Fantastic. Many thanks for the quick response! I can confirm that the change works perfectly.