One shiny app container with multiple datasets' access


#1

Hello Guys,

I need to give access to multiple users to a shiny app (depending on Geographical regions).

The solution I’m using now (image below) consists of duplicating the same container, where the data files represent a data.rds local file filtered on Region of access.

Project

Is there any way to create only one docker that connects to a specific dataset (or trigger a filter) based on authentified user ?

shyny_proxy_r

Thank you


#2

I cannot see the difficulties here.

Because ShinyProxy will pass the login username and group to the container, it seems the simplest solution is to read different files depending on the SHINYPROXY_USERNAME environment variable.


#3

I did something similar for my ShinyProxy/Shiny/RStudio Docker stack. In my configuration, users have access to either “Apps & Reports”, “Documents”, “Site Content”, or “RStudio”. Permissions can be applied to limit who can invoke which container(s). See the configuration in the repo below.

You could fork the code above and create a version in which users are provisioned access to “Region 1”, “Region 2”, “Region 3”, etc. You could also spin up independent sites hosting on different ports. See the README in the linked repo above to see how.


#4

Another thing that may be useful to you is using ‘conditional’ volume mapping depending on the username, please see this answer in another topic.