From 2069e6915c694c17769dc5dfa075788f3b9567e5 Mon Sep 17 00:00:00 2001 From: Peter Solymos Date: Fri, 28 Jan 2022 09:27:50 -0700 Subject: [PATCH] Add R/Shiny starter (#221) * Add Shiny template Signed-off-by: Peter Solymos * Update description and button Signed-off-by: Peter Solymos --- examples/shiny/Dockerfile | 5 +++++ examples/shiny/README.md | 15 +++++++++++++++ icons/r.svg | 14 ++++++++++++++ 3 files changed, 34 insertions(+) create mode 100644 examples/shiny/Dockerfile create mode 100644 examples/shiny/README.md create mode 100644 icons/r.svg diff --git a/examples/shiny/Dockerfile b/examples/shiny/Dockerfile new file mode 100644 index 0000000..b29434a --- /dev/null +++ b/examples/shiny/Dockerfile @@ -0,0 +1,5 @@ +FROM registry.gitlab.com/analythium/shinyproxy-hello/hello + +ENV PORT=3838 + +CMD ["R", "-e", "shiny::runApp('/home/app', host = '0.0.0.0', port=as.numeric(Sys.getenv('PORT')))"] \ No newline at end of file diff --git a/examples/shiny/README.md b/examples/shiny/README.md new file mode 100644 index 0000000..5abcce4 --- /dev/null +++ b/examples/shiny/README.md @@ -0,0 +1,15 @@ +--- +title: Shiny +description: An R/Shiny starter for Railway +tags: + - rstats + - r + - shiny + - http +--- + +# Shiny example + +This example is a small [R](https://www.r-project.org/) [Shiny](https://shiny.rstudio.com/) application. The starter uses [Dockerfile](https://docs.railway.app/deploy/docker) to deploy the app. Read more about containerizing Shiny apps [here](https://hosting.analythium.io/dockerized-shiny-apps-with-dependencies/). Make sure that Shiny is using the `PORT` environment variable for the Shiny port. + +[![Deploy on Railway](https://railway.app/button.svg)](https://railway.app/new/template?template=https%3A%2F%2Fgithub.com%2Frailwayapp%2Fexamples%2Ftree%2Fmaster%2Fexamples%2Fshiny&referralCode=ItV1BC) diff --git a/icons/r.svg b/icons/r.svg new file mode 100644 index 0000000..78281f7 --- /dev/null +++ b/icons/r.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + +