Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
In our last blog post we mentioned the need people felt to integrate Shiny apps in content management systems like Drupal. Release 0.7.8 added one extra feature in this respect so people could also include ShinyProxy hosted Shiny apps in external iframes.
It also kicked-off our effort to support service scalability and ever more complex apps. In the scalability area, we introduced facilities to manage and set memory limits on individual Shiny applications. This is as easy as adding a docker-memory field:
apps: -name: euler display-name: Euler's number docker-cmd: ["R", "-e shiny::runApp('/root/euler')"] docker-image: openanalytics/shinyproxy-template docker-memory: 256m groups: scientists
and one can use b, k, m or g as units for the memory limit.
Regarding efforts to support more complex apps, we introduced the possibility to pass arbitrary numbers of environment variables to the Shiny containers. One use case is to be able to pass database connection strings as environment variables to the containers. This can be done by specifying the path (on the host) in which the environment variables are defined:
If we use the Euler app example again (the example that can be used as a template to deploy your own apps), the configuration would use the docker-env-file field as in:
apps: - name: euler display-name: Euler's number docker-cmd: ["R", "-e shiny::runApp('/root/euler')"] docker-image: openanalytics/shinyproxy-template docker-memory: 256m docker-env-file: /path/to/env-file groups: scientists
One way to deal with persistence in Shiny apps is through databases. Another important option is to achieve persistence via file systems that need to be accessible across sessions or across users. In Docker world the elegant solution to deal with this is to mount (host) file systems as volumes on the container.
Using our beloved Euler app again we would use the docker-volumes field which supports mounting multiple volumes as well:
apps: - name: euler display-name: Euler's number docker-cmd: ["R", "-e shiny::runApp('/root/euler')"] docker-image: openanalytics/shinyproxy-template docker-memory: 256m docker-volumes: [ "/host/path1:/container/path1", "/host/path2:/container/path2" ] groups: scientists
Documentation has been updated on the project homepage and as always community support on this new release is available on our support site.
With the New Year fast approaching we are setting our intentions for the next releases, so don’t hesitate to send suggestions for ShinyProxy and have fun!
R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.