Using JupyterDash in a docker with reverse proxy

I have a docker container running Jupyter lab on my NAS that i can access when on wifi using the NAS IP address (192.168.1.100:8888) or via a reverse proxy (jupyterlab.domain.com).

I’m trying to get JupyterDash working in this environment but can’t work it out.

When i try to run the jupyterdash app.run_server i get the message “Dash app running on http://127.0.0.1:8050/”. I assume that’s on the container which is why the dash can’t be accessed by going to that address nor will the dash display if i select inline/jupyterlab modes.

After some googling i found a suggestion to set the host to ‘0.0.0.0’.
When i set the host to be ‘0.0.0.0’ and run the server i get the message “Dash app running on http://0.0.0.0:8050/”. Again if i open that address or try to display with mode inline, it doesn’t work. But if i expose my 8050 port in the docker container, the dash can be accessed by going to the NAS’s IP address (192.168.1.100:8050). I guess i could set up a reverse proxy to access this by another domain (dash.domain.com) when i’m not on the wifi network.

Is there however a better way to get JupyterDash working in a docker container with a reverse proxy? I.e. when i run the server inline, the dash displays in jupyter lab?

bumping hoping some network / docker / jupyter experts see and know the solution…