snipem / gt7dashboard

Gran Turismo 7 Race Telemetry Dashboard
GNU General Public License v3.0
177 stars 30 forks source link

Not working for me #8

Closed Kalten70 closed 1 year ago

Kalten70 commented 1 year ago

I tried to run this directly on Linux and in a docker container. Bokeh appears to serve and give the page, but it is blank. In the source code for the page, all the bokeh script links refer to localhost, which means scripts are not found as localhost will mean the computer running the browser not the app server. How to configure bokeh so it puts relational links to the libraries so the app will work on containers and other machines?

Kalten70 commented 1 year ago

I've gone through the bokeh documentation and found a solution:

In the docker-compose.yaml or the command line in run.sh add the following environment variables:

BOKEH_RESOURCES=cdn
BOKEH_ALLOW_WS_ORIGIN=<server IP>:5006

where <server IP> is the IP for the machine running the app or docker host depending on how it's configured. This forces bokeh to load its resources from their CDN. There may be another way using 'relative' but this works for me.

If you want your app to be more portable, feel free to implement this change.