coding
coding

Reputation: 1207

How can I deploy my shiny app as a package?

I want to deploy my shiny application but as a package something like this:

library(mylibrary)

run_app()

How can I do this?

Thank you

Upvotes: 1

Views: 1100

Answers (2)

Colin FAY
Colin FAY

Reputation: 5109

If you're built your app using {golem}, you can do the following:

  • deploy on CRAN, then build the app as a package (devtools::build()), then send the tar.gz to the CRAN
  • deploy on RStudio products, then you can use one of the functions from {golem} to do that (add_rstudioconnect_file() for example)
  • As a docker container, then you can build the Dockerfile using golem::add_dockerfile()

I'd suggest the following resource for more information: https://engineering-shiny.org/deploy-golem.html

Colin

Upvotes: 2

polkas
polkas

Reputation: 4184

I think that you want to use rsconnect package/way to deploy the app. Then you could use CRAN and/or public github packages.

https://rdrr.io/cran/rsconnect/man/rsconnectPackages.html

You should start with putting your package on public in github. Then install it locally with devtools::install_github which is important to create a proper DESCRIPTION file for packrat package. Now you could use the rsconnect::deployApp function or rsconnect button to deploy the app.

Upvotes: 0

Related Questions