Issue
I have a shiny dashboard, which I have deployed on my custom server (running CentOS). It is deployed by running the following command on the terminal -
> cd "path_to_shiny_app"
> R -e "shiny::runApp(port=XXXX, host = getOption('shiny.host', 'xxx.xx.xx.xxx'))"
On the same server, I also have a WordPress website running. Both Shiny Dashboard and WordPress site will keep running 24x7.
Question 1 - Is there a way I can place a link to Shiny Dashboard on the WordPress site so that my website users can Shiny App through that link?
Question 2 - Is there a limit to the number of users accessing this shiny dashboard in this way?
I am sure someone must have solved it earlier and can help.
Solution
Yes, but you need to do more things before generating the link.
- Using
shiny::runApp
directly is not recommended. You want to use a shiny server instead. Depending on the version (free, paid) you use, user counts, load balancing and other settings can be modified accordingly. I personally recommend to use shiny docker instead of installing by yourself. - Once your Shiny apps are running in a localhost port by the shiny server, In order to have it visible for people outside your local network, you need to use a reverse proxy service like nginx or apache to "export" to ports.
- Setup your server firewall configs so reverse proxy service can pass the firewall.
- Optional, go to your domain manager, create a subdomain for shiny apps.
Additional detailed readings: https://deanattali.com/2015/05/09/setup-rstudio-shiny-server-digital-ocean/
Back to your question Q1, once you have done above, you should have the Shiny app link, and you can use it on your WordPress. Q2, there is no user limit, it depends on how powerful your server is. Too many people using the server at the same time may crash it. Paid version of Shiny server has load balancing settings, not sure about the free version.
Answered By - lz100
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.