Deploy a Shiny app to Polished Hosting
deploy_app(
app_name,
app_dir = ".",
api_key = get_api_key(),
launch_browser = TRUE,
region = "us-east1",
ram_gb = 2,
r_ver = NULL,
tlmgr = character(0),
golem_package_name = NULL,
cache = TRUE,
gh_pat = NULL,
max_sessions = Inf
)an object of class polished_api_res.
Your Shiny app's name.
The path to the directory containing your Shiny app.
Your polished API key. Defaults to Sys.getenv("POLISHED_API_KEY") if set.
Boolean (default: TRUE) - Whether or not to open
your newly deployed app in your default web browser after successful deployment.
the region to deploy the app to on Google Cloud Platform. See
https://cloud.google.com/run/docs/locations for all available regions
on Google Cloud Platform. Currently, database connections are only supported for
us-east1. See https://polished.tech/docs/06-database-connections for details.
the amount of memory (in GiB) to allocate to your Shiny app's server.
Valid values are 2, 4, 8, 16, or 32.
Character string of desired R version. If kept as NULL (the default),
deploy_app() will detect the R version you are currently running. The R version must be a version
supported by an r-ver Docker image. You can see all the r-ver Docker image versions
of R here https://github.com/rocker-org/rocker-versioned2/tree/master/dockerfiles and here
https://github.com/rocker-org/rocker-versioned/tree/master/r-ver.
a character vector of TeX Live packages to install. This is only used if your Shiny
app generates PDF documents. Defaults to character(0) for no TeX Live installation. Provide a
character vector of your TeX Live package dependencies to have all your TeX Live packages installed at build time.
if your Shiny app was created as a package with the
golem package, provide the name of the Shiny app package as a character string.
Defaults to NULL. Keep as NULL for non golem Shiny apps.
Boolean (default: TRUE) - whether or not to cache the Docker image.
optional GitHub PAT for installing packages from private GitHub repos.
the maximum number of concurrent sessions to run on a single app instance before
starting another instance. e.g. set to 5 to have a max of 5 user sessions per app instance.
The default is Inf which will run all concurrent sessions on only 1 app instance.
if (FALSE) {
deploy_app(
app_name = "polished_example_01",
app_dir = system.file("examples/polished_example_01", package = "polished"),
api_key = ""
)
}
Run the code above in your browser using DataLab