Firstly, thanks so much for the efforts and open sourcing Shinyproxy.
Background
I deployed a Flask ‘hello world’ container on Shinyproxy which worked fine once I changed the ports to 3838. However, I’m now moving into deploying more complex python apps on Shinyproxy, namely dash apps. Dash was released a few months ago by Plotly claiming to be the ‘shiny of python’. This is quite exciting particularly if both Shiny and Dash can be deployed on Shinyproxy. The issue is dash apps require additional static resources. (Disclaimer!) I haven’t programmed in Java or SpringBoot. However, as far as I can see from looking at Chrome developer tools there are two ways Shinyproxy delivers static files to the client.
- Webjars - I can see that the main template of shinyproxy loads the bootstrap css which I think also gets utilised by each shiny app.
Possible Solution: Add all the static resources to the pom.xml
and add them on the webjars.org site.
-
Load from the Container - Additional static content for shiny apps is requested by using the container name, in this case
peaceful_jepsen
e.g.:
Request URL:http://<my-ip-address>/peaceful_jepsen/dt-core-1.10.12/css/jquery.dataTables.min.css
Possible Solution: Write Python code for the Dash app that obtains the container name and appends the path.
The Problem
When I deploy a Dash app the containerPath is not being inserted into the GET URL Request. Instead, it sends the request to the root. E.g.
`Request URL: http://<my-ip-address>/_dash-layout`
Questions
- What is the best approach out of the above two methods for delivering static content to a non-shiny app? Or maybe there’s a better way.
- Can I edit the application.yml configuration or source code to solve the problem?
- Any recommended reading / documentation on how static files are being served for shinyproxy?