Monday 19 December 2016 - 08:16<div>
<p>ShinyProxy is a novel, open source platform to deploy Shiny apps for the enterprise or larger organizations. In our <a href="https://www.openanalytics.eu/blog/shinyproxy-075">last blog post</a> we mentioned the need people felt to integrate Shiny apps in content management systems like <a href="https://www.drupal.org/">Drupal</a>. Release 0.7.8 added one extra feature in this respect so people could also include ShinyProxy hosted Shiny apps in external iframes.</p>
<p>It also kicked-off our effort to support <strong>service scalability</strong> and ever more <strong>complex apps</strong>. In the scalability area, we introduced facilities to manage and set memory limits on individual Shiny applications. This is as easy as adding a <span><code>docker-memory</code></span> field:</p>
<p></p><div><pre>apps:
  - name: euler
    display-name: Euler's number
    docker-cmd: [&quot;R&quot;, &quot;-e shiny::runApp('/root/euler')&quot;]
    docker-image: openanalytics/shinyproxy-template
    docker-memory: 256m
    groups: scientists</pre></div>
<p>and one can use <span><code>b</code></span>, <span><code>k</code></span>, <span><code>m</code></span> or <span><code>g</code></span> as units for the memory limit.</p>
<p>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 <strong>database</strong> 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:</p>
<p>If we use the Euler app example again (the example that can be used as a <a href="https://github.com/openanalytics/shinyproxy-template">template</a> to <a href="http://www.shinyproxy.io/deploying-apps/">deploy your own apps</a>), the configuration would use the <span><code>docker-env-file</code></span> field as in:</p>
<p></p><div><pre>apps:
  - name: euler
    display-name: Euler's number
    docker-cmd: [&quot;R&quot;, &quot;-e shiny::runApp('/root/euler')&quot;]
    docker-image: openanalytics/shinyproxy-template
    docker-memory: 256m
    docker-env-file: /path/to/env-file
    groups: scientists</pre></div>
<p>One way to deal with persistence in Shiny apps is through databases. Another important option is to achieve persistence via <strong>file systems</strong> 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.</p>
<p>Using our beloved Euler app again we would use the <span><code>docker-volumes</code></span> field which supports mounting multiple volumes as well:</p>
<p></p><div><pre>apps:
  - name: euler
    display-name: Euler's number
    docker-cmd: [&quot;R&quot;, &quot;-e shiny::runApp('/root/euler')&quot;]
    docker-image: openanalytics/shinyproxy-template
    docker-memory: 256m
    docker-volumes: [ &quot;/host/path1:/container/path1&quot;, &quot;/host/path2:/container/path2&quot; ]
    groups: scientists</pre></div>
<p>Documentation has been updated on the <a href="http://www.shinyproxy.io/">project homepage</a> and as always community support on this new release is available on our <a href="https://support.openanalytics.eu/">support site</a>.</p>
<p>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!</p>
</div>
<div><div>This post is about: </div><a href="https://www.openanalytics.eu/blog/tags/r">r</a>, <a href="https://www.openanalytics.eu/blog/tags/shiny">shiny</a>, <a href="https://www.openanalytics.eu/blog/tags/shinyproxy">shinyproxy</a></div>