You can deploy Shiny apps to Shiny Server via two main strategies.
- You can physically transfer files from your local machine to the Shiny Server
- You can store files on a shared disk that is accessible from both your local machine and Shiny Server.
If you want to deploy apps in production here are two common ways.
- Deploy apps to a staging server and then allow IT to move apps from staging into production.
- Check apps into a version control system and then push version control into production. The push can be automated (e.g., every 5 minutes).
Probably the simplest setup for Shiny Server is to configure it to use the same data and user home directories as your RStudio IDE (Desktop, open-source server, or Workbench (previously RStudio Server Pro)). Shared directories eliminate the need for moving files. To make things even easier, you can host apps in user home directories and run apps as :HOME_USER:. This should make your apps fault tolerant in that they will behave the same for you and anyone else. But note, this setup will only work for narrow use cases.
Finally, once an app is deployed there are multiple hosting models available.
See also Share Your Apps and Administering Shiny Server Pro.
Comments