Apps in sudirectories

Hi Open Analytics folks. First off, thanks for ShinyProxy. I’ve been enjoying it a lot so far.

I have a question about putting apps in subdirectories. What I’m trying to do is use several Shiny app that are served out to two groups. These groups will enter some data which will be stored on the host. I’ve created Docker volumes for each group and can easily hook up the containers to the volumes, but I’d like to put the apps in subdirectories using something like this:

proxy:
  title: Open Analytics Shiny Proxy
  logo-url: http://www.openanalytics.eu/sites/www.openanalytics.eu/themes/oa/logo.png
  landing-page: /
  heartbeat-rate: 10000
  heartbeat-timeout: 60000
  port: 8080
  authentication: none
  # Docker configuration
  docker:
    cert-path: /home/none
    url: http://localhost:2375
    port-range-start: 20000
  specs:
    - id: group_a/app_1
      display-name: Cool App
      container-cmd: ["R", "-e", "shiny::runApp('/root/cool_app', port = 3838, host = '0.0.0.0')"]
      container-volumes: [ "/var/lib/docker/volumes/vol1a:/root/data" ]
      container-image: cool-app
    - id: group_b/app_1
      display-name: Cool App
      container-cmd: ["R", "-e", "shiny::runApp('/root/cool_app', port = 3838, host = '0.0.0.0')"]
      container-volumes: [ "/var/lib/docker/volumes/vol1b:/root/data" ]
      container-image: cool-app
    - id: group_a/app_2
      display-name: Awesome App
      container-cmd: ["R", "-e", "shiny::runApp('/root/awesome_app_a', port = 3838, host = '0.0.0.0')"]
      container-volumes: [ "/var/lib/docker/volumes/vol2a:/root/data" ]
      container-image: awesome-app-a
    - id: group_b/app_2
      display-name: Awesome App
      container-cmd: ["R", "-e", "shiny::runApp('/root/awesome_app_b', port = 3838, host = '0.0.0.0')"]
      container-volumes: [ "/var/lib/docker/volumes/vol2b:/root/data" ]
      container-image: awesome-app-b
logging:
  file:
    shinyproxy.log

In this example, the first two apps, both with display name “Cool App”, use the same Docker image (cool-app) but the two write to different Docker volumes. In the second set of apps, both with display name “Awesome App”, the two use different containers, specific to each group. Again, these write to volumes specific to each group.

This is important because I want to use relative links for users to navigate to other apps, but since some apps are the same, I want to use the same container image to minimize duplicate work.

Unfortunately this doesn’t work with the “/” in the id field. The links to the apps navigate to the expected page, (e.g., localhost:8080/app/group_a/app_1), but the app is not there. I should note that everything is working fine when omitting the slash from the id field. Is it possible to get this behavior with Shiny Proxy? At least without manually creating an .html file for the config variable template-path? I think how content is dynamically generated on the landing page, so I wouldn’t want to hard code things in there if possible.