ShinyProxy is a novel, open source platform to deploy Shiny apps for the enterprise or larger organizations.
In our previous release (see this blog post) we announced our focus on scalability with support for Docker Swarm back-ends. With version 1.1.0 we moved to hyperscaling Shiny apps in the datacenter by adding support for Kubernetes. We have used it for customers that roll out internet-facing Shiny apps with high numbers of concurrent users and needs for automated deployment.
A Kubernetes back-end can simply be configured using
shiny: proxy: container-backend: kubernetes
and kubernetes specific properties allow to set all typical configurations such as the apiserver URL, certificates for accessing the cluster over https, namespaces for pod creation, definition of the pull policy etc.
ShinyProxy in a container
In a similar vein, we also worked on running ShinyProxy itself in a container on the different backends (Docker, Docker Swarm and Kubernetes). Containerizing ShinyProxy per se is not a difficult exercise (it is nothing more than a single jar file to launch), but one can distinguish two ‘run modes’:
- ShinyProxy runs inside a container, in the same container manager where it spawns shiny apps, or
- ShinyProxy does not run inside a container, or as a container in a different container manager.
To operate in this first mode, we introduced a new setting
which (for the Docker backend) can be set as follows:
shiny: proxy: docker: internal-networking: true ...
If the ShinyProxy container was started in a dedicated network e.g.
one can indicate that the apps should have interfaces in the same network
apps: - name: beautiful-app docker-network: shinynet ...
If you want to try this out, you can
docker pull openanalytics/shinyproxy from Dockerhub.
Python apps ?!
Another new feature in this release is the support of Dash apps. Dash is the equivalent of Shiny in the Python world and built on top of Plotly.js, React, and Flask.
Dash apps will by default run on port 8050, so we added a new
port property that can be defined at the level of individual
shiny: ... apps: - name: dash-demo display-name: Dash Demo Application port: 8050 docker-cmd: ["python", "app.py"] docker-image: openanalytics/shinyproxy-dash-demo ...
With ShinyProxy you can now use one single framework to roll out both R/Shiny apps and Python/Dash apps!
Besides the Kubernetes back-end, containerization and the support for Dash apps, we also made a number of small improvements. It is e.g. possible now to have multiple sessions per user/app combination. In other words a user can have multiple browser tabs with the same app in one single or in multiple browsers. Also the LDAP configuration has been extended and documented more elaborately. Finally, on community demand we added the possibility to pass a
privileged flag when running a Docker container.
For all these new features, documentation has been updated on http://shinyproxy.io and as always community support on this new release is available at
Don’t hesitate to send in questions or suggestions and have fun with ShinyProxy!