gietema / clusterfun

Explore audio and images with one line of code. Python plotting library for data visualisation.
https://clusterfun.app
Apache License 2.0
43 stars 3 forks source link

set the server host IP and port #151

Closed nicolas-busca closed 2 months ago

nicolas-busca commented 2 months ago

Is your feature request related to a problem? Please describe. When running clusterfun on a remote server I'd like to be able to access directly the app via the host IP (or domain) on a specified port. It's really annoying to have to open a tunnel every time :-)

Describe the solution you'd like Set the host IP or domain and port when running the server (like clt.scatter(... host='my.pretty.host', port=31416)

Describe alternatives you've considered I'm aware that a current workaround is to access the app opening an ssh tunnel.

nicolas-busca commented 2 months ago

it looks like i can specify the port via CLUSTERFUN_PORT, but I haven't seen an option to specify the port

nicolas-busca commented 2 months ago

It works as I expect if I set host="0.0.0.0" in the uvicorn config in clusterfun/plot.py

gietema commented 2 months ago

Thanks, good idea. I can add the host as an environment variable as well - that should solve it?

nicolas-busca commented 2 months ago

Thanks, good idea. I can add the host as an environment variable as well - that should solve it?

yes! definitely, thanks!

gietema commented 2 months ago

@nicolas-busca Ok, I hope this works and thanks for raising this! Please open an issue if you encounter anything that's not working, happy to fix it!

nicolas-busca commented 2 months ago

FYI I've tested it and works!