Replies: 1 comment 1 reply
-
This is exactly the feature I'm working on right now: hosting multiple Flet web apps with production-grade durability! I'm doing final touches in that PR and hopefully merge it tomorrow, so we all will have a chance to give it a try. It's exciting to see Flet handling dozens of sessions/connections while gunicorn has only one thread running! :) |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
/
So - I made my awesome dashboard with flet and published it in a docker container called dash. App is started with:
ft.app(name="", port=8850, target=main, view=ft.WEB_BROWSER)
My nginx reverse proxy (in another docker container) is configured like described in the Self Hosting Guide (only adapted
proxy_pass
to my environment), and calling https://app.mydomain.com/ works like charm. The dashboard works as expected. Nginx config looks like this:/dash
Next step is that I don't really want my dashboard under in the root folder

/
as I plan to have multiple flet dashboards in/dash
,/dash2
..., and maybe a toolbox in plain html in the root folder/
with links to the dashboardsTo move my first dashboard from
/
to/dash
I found that the nginx config needs to look like this to work (shortened to show changes or important areas only):With this config my dashboard works fine on https://app.mydomain.com/dash. The changes I made are 1) adding the rewrite block and 2) change the app location from
/
to/dash
SO FAR SO GOODBUT WAIT - why didn't I change the location for websocket from
/ws
to/dash/ws
as you would expect just following the pattern? Because that did not work. And I did try adding another rewrite block like this:/dash and /dash2
I am by no means any expert on nginx nor websocket. But testing confirms that I cannot add the second dashboard by just adding a second rewrite and location like this
because I would also need to route websocket to the 2 different containers dash and dash2, and that is not possible as long as the websocket locations would be
/ws
for both of them.So to the question(s):
Beta Was this translation helpful? Give feedback.
All reactions