Set Base-Path to access Flowise UI
Discussed in https://github.com/FlowiseAI/Flowise/discussions/2889
Originally posted by PythonbergIT July 26, 2024 We deployed Flowise in a Azure Container Instance. In order to access the Flowise UI, it would be necessarry to set the base path in the environment variables to "/flowise".
Motivation:
Currently the assets are not reachable, when trying to access the Flowise UI.
what do you mean by setting the base path in the environment variables to "/flowise"?
Any luck here? I was looking for this as well.
I want to run flowise in a root URL other than the base so I can keep my URLs tidy. (ex. htts://mydomain.com/Flowise/)
My kubernetes ingress gets me the home page but everything else is expecting to be relative to / and not /Flowise
http://mydomain.com/assets/index-DZi9Ew0q.js
should be
http://mydomain.com/Flowise/assets/index-DZi9Ew0q.js
Thanks
I'm having the same issue. Most projects have the base url as an enviromental variable, it would make things much easier for me if Flowise had that option as well.
+1
It would be really helpful for deploying in Kubernetes
+1
+1
+1
+1
If you are willing to build from source and fix the frontend yourself then you should be able to get this working. I've made some changes on our internal instance which has resolved this issue for us as far as I can tell.
If you are willing to build from source and fix the frontend yourself then you should be able to get this working. I've made some changes on our internal instance which has resolved this issue for us as far as I can tell.
Yes, its possible. We worked our way round in a similar manner. Still, this could easily be an ENV Variable, which would make it a lot easier.
If you are willing to build from source and fix the frontend yourself then you should be able to get this working. I've made some changes on our internal instance which has resolved this issue for us as far as I can tell.
Yes, its possible. We worked our way round in a similar manner. Still, this could easily be an ENV Variable, which would make it a lot easier.
@PylotLight @usu-mb Could you share the specific changes you made to fix the issue? It would be very helpful
@jmm-usu Unfortunately we're still having issues so I wouldn't say its resolved. We still get white screen issues as seen here: https://github.com/FlowiseAI/Flowise/issues/3583
Some changes made include: src/packages/ui/src/index.jsx const prefix = window.location.pathname <BrowserRouter basename={prefix}>
src/packages/ui/package.json "build": "vite build --base './'",
src/packages/ui/src/store/constant.js export const baseURL = import.meta.env.VITE_API_BASE_URL || normalizePath(window.location.origin, window.location.pathname) export const uiBaseURL = import.meta.env.VITE_UI_BASE_URL || normalizePath(window.location.origin, window.location.pathname)
@PylotLight
according to this discussion:
the file where you have to adjust is: https://github.com/FlowiseAI/Flowise/blob/main/packages/server/src/index.ts#L561
@jmm-usu Unfortunately looks like that file has changed, so the referenced line doesn't line up, will have to figure out what was intended or you can comment on the discussion to try get an update perhaps.
+1
Has anyone made any progress here?
I assume, in discussion 532, @HenryHengZJ meant to change the line:
this.app.use('/', express.static(uiBuildPath))
but that doesn't actually solve the problem, since the requests don't go to the Express Server, but to the root path of the web server:
An example would be the assets files as follows:
+1
any stable solution found yet?
+1
+1
+1
+1
+1
+1
+1
Pull request created for this issue https://github.com/FlowiseAI/Flowise/pull/5254