Flowise icon indicating copy to clipboard operation
Flowise copied to clipboard

Set Base-Path to access Flowise UI

Open PythonbergIT opened this issue 1 year ago • 23 comments

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. image

PythonbergIT avatar Jul 30 '24 12:07 PythonbergIT

what do you mean by setting the base path in the environment variables to "/flowise"?

HenryHengZJ avatar Aug 01 '24 15:08 HenryHengZJ

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

automateright avatar Aug 25 '24 21:08 automateright

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.

jars08 avatar Sep 20 '24 20:09 jars08

+1

thiagolealassis avatar Sep 23 '24 11:09 thiagolealassis

It would be really helpful for deploying in Kubernetes

Alpe6825 avatar Sep 28 '24 08:09 Alpe6825

+1

avfirsov avatar Sep 30 '24 12:09 avfirsov

+1

rudenko-never-die4 avatar Nov 19 '24 23:11 rudenko-never-die4

+1

usu-mb avatar Nov 22 '24 12:11 usu-mb

+1

vdscruz avatar Nov 23 '24 17:11 vdscruz

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.

PylotLight avatar Nov 25 '24 14:11 PylotLight

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.

usu-mb avatar Nov 26 '24 09:11 usu-mb

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 avatar Nov 26 '24 16:11 jmm-usu

@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 avatar Nov 27 '24 01:11 PylotLight

@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 avatar Nov 27 '24 11:11 jmm-usu

@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.

PylotLight avatar Nov 27 '24 12:11 PylotLight

+1

TheBigAleski avatar Nov 29 '24 13:11 TheBigAleski

Has anyone made any progress here?

jeme95 avatar Jan 22 '25 13:01 jeme95

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:

Image

jeme95 avatar Jan 23 '25 12:01 jeme95

+1

spole-plcom avatar Feb 11 '25 11:02 spole-plcom

any stable solution found yet?

MB-MuratBayraktar avatar Apr 09 '25 16:04 MB-MuratBayraktar

+1

golosegor avatar Apr 21 '25 14:04 golosegor

+1

Min-Hao avatar Apr 29 '25 07:04 Min-Hao

+1

fpapadamis avatar May 16 '25 11:05 fpapadamis

+1

Rajdevraj avatar Jul 31 '25 16:07 Rajdevraj

+1

hengxian-jiang avatar Sep 01 '25 05:09 hengxian-jiang

+1

prd-tuong-nguyen avatar Sep 12 '25 09:09 prd-tuong-nguyen

+1

prd-tai-le avatar Sep 12 '25 09:09 prd-tai-le

Pull request created for this issue https://github.com/FlowiseAI/Flowise/pull/5254

tiarebalbi avatar Sep 24 '25 21:09 tiarebalbi