jupyter / dashboards_server

[RETIRED] Server that runs and renders Jupyter notebooks as interactive dashboards
Other
181 stars 48 forks source link

Serve dashboards with a prefix #260

Closed mao-liu closed 7 years ago

mao-liu commented 8 years ago

Hi,

I recently tried to collect the several web services under one Apache server, one of them is the dashboards server. Each of these services run on a different localhost port, and Apache acts as the reverse-proxy to direct different URLs to different ports based on the prefix.

e.g. my.domain.com/jupyter --> http://127.0.0.1:9500/jupyter, jupyter hub serving on localhost:9500/jupyter my.domain.com/jenkins --> http://127.0.0.1:8080/jenkins, jenkins serving on localhost:8080/jenkins ...`

I cannot find a way to specify a prefix for the dashboards server. I can only get it to serve on http://host:port, whereas I would like to be able to serve at http://host:port/prefix.

My initial dig into this points to some changes required in the templates, particularly the way /css and /components are linked in the templates.

Is this an easy thing to implement? I am not very familiar with node/express, but will be happy to have a go at a pull request.

Cheers,

parente commented 8 years ago

@ch41rmn We'd love a PR if you're willing to tackle this.

You are correct that the dashboard server is not currently relocatable under different paths. I'm pretty certain there is no major impediment preventing it, just a matter of finding all the spots that might break. The ones that come to mind are:

@jhpedemonte, @dalogsdon can you think of other spots that would need updating?

dalogsdon commented 8 years ago

I think those mentioned by @parente are the main points.

parente commented 7 years ago

Fixed by #292.