This repo contains code for building and deploying web applications (e.g. shiny, fiery, and flask) that I've developed for public consumption.
Each app has it's own Docker container, as well as a image tag on DockerHub, so you can easily run apps on your local machine; for example, this will run the zikar (shiny) app on http://localhost:3838
docker run -p 3838:3838 cpsievert/apps:shiny-zikar
If you'd like to run a particular app in this repo, you can get the relevant image tag from the application.yml
file.
To run all the applications, you'll need to pull (or build) all the corresponding docker images. A necessary first step is to pull (or build) the corresponding docker images. Either way, I'd suggest cloning this repo:
git clone https://github.com/cpsievert/apps.git
cd apps
Now you can run the make
command to build all the images or make pull
to pull them from my registry.
The application.yml
can be used/modified to (securely) run all the applications as a service via shinyproxy. See my blog post (coming soon).
wget https://www.shinyproxy.io/downloads/shinyproxy-1.0.1.jar
java -jar shinyproxy-1.0.1.jar
Some guidelines for adding new apps:
- Run
make shiny app=my-app
(replacingmy-app
with a suitable name). - Place your shiny app under the new
shiny/apps/my-app
directory. - Ensure the Dockerfile has the right system/R requirements (
rsconnect::appDependencies()
can be helpful during this step). - Add
docker build -t cpsievert/apps:shiny-my-app shiny/apps/my-app
to the Makefile - Under apps in the
application.yml
file, add your app's name, description, etc.