Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vanhry/r.control
Lightweight R shiny app for managing R services (plumber/shiny) deployed with Caddy
https://github.com/vanhry/r.control
caddy golem plumber r shiny
Last synced: 6 days ago
JSON representation
Lightweight R shiny app for managing R services (plumber/shiny) deployed with Caddy
- Host: GitHub
- URL: https://github.com/vanhry/r.control
- Owner: vanhry
- License: other
- Created: 2022-06-17T13:39:56.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2022-07-20T11:38:54.000Z (over 2 years ago)
- Last Synced: 2024-12-04T06:35:09.951Z (28 days ago)
- Topics: caddy, golem, plumber, r, shiny
- Language: R
- Homepage:
- Size: 373 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.Rmd
- License: LICENSE
Awesome Lists containing this project
README
---
output: github_document
---```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```## R.control
[![R build status](https://github.com/vanhry/R.control/workflows/R-CMD-check/badge.svg)](https://github.com/vanhry/R.control/actions)
The goal of R.control is to control all of your R plumber (actually any http based) services in one place.
# Shiny app
#### Deployment of shiny app
Lightweight version of shiny application based on [R-minimal Docker image](https://github.com/r-hub/r-minimal) with simple and secure [Caddy server](https://github.com/caddyserver/caddy)
You just need to clone the repo, build the docker, install system variables `$HOST` and `$EMAIL`, and run:
```docker-compose up -d```And that's it! `r emo::ji("contest")`
# Package
#### Installation of package
Development version
``` R
remotes::install_github("vanhry/R.control")
`````` {r}
library(R.control)
```If you want to use this library you must create `yaml` file of your plumber services
``` yaml
`r xfun::file_string(system.file("plumber_services.yaml",package="R.control"))`
```Add to your `plumber.R` file **/healthcheck** method
```r
#' @get /healthcheck
function(res) {
res$status <- 200
res$body <- "Healthy"
res
}
```You can use `create_table_plumber("path/to/file")` to receive the table of all services
```{r}
data <- create_table_plumber(system.file("plumber_services.yaml",package="R.control"))
data
```Also it's possible to use shiny application with:
```r
R.control::run_app()
```
![Shiny app screen](inst/imageapp3.png)If click on Details for shiny server, it will open the modal with each service
![Shiny apps](inst/imageapp2.png)
Build Docker
```shell
docker build . -t user/plumbercontrol_app -f Dockerfile
```Project was created using [golem](https://github.com/ThinkR-open/golem) package