Hi there,
I’ve been trying to dockerise a bokeh server (serverapp), and use it to provide an interactive graph to django website (webapp). I’m trying to use nginx as a reverse-proxy to manage the requests to webapp from the outside world, and between webapp and serverapp.
Webapp is using bokeh.server_document to get the data from the serverapp (and then render that in a script on the page). I believe that server_document requires a url which makes the request to the specified server over the web (rather than a direct network connection). This is causing me all manner of configuration headaches.
If I do this all from one machine it works, If I spin up each of the apps in separate docker containers and hit them, I get the desired response from each container. As soon as I insert nginx and try and network them together I cant get the graph to render. I can’t hit the serverapp with the correct payload to make it run the graph.
I have tried to build up from the nginx example in the documentation (Running a Bokeh server — Bokeh 2.4.2 Documentation) but this gives me an nginx 502 bad gateway error (logs on the serer show the connection is refused despite allow-websockets: *)
I have raised a StackOverflow question with much more detail here: (How to use bokeh-server (server_document) behind nginx, with django, on docker? - Stack Overflow)
Any pointers would be welcomed. This has been a stumbling block for months now.