deployApp: Deploy an Application

View source: R/deployApp.R

deployAppR Documentation

Deploy an Application


Deploy a shiny application, an RMarkdown document, a plumber API, or HTML content to a server.


  appDir = getwd(),
  appFiles = NULL,
  appFileManifest = NULL,
  appPrimaryDoc = NULL,
  appSourceDoc = NULL,
  appName = NULL,
  appTitle = NULL,
  appId = NULL,
  contentCategory = NULL,
  account = NULL,
  server = NULL,
  upload = TRUE,
  recordDir = NULL,
  launch.browser = getOption("rsconnect.launch.browser", interactive()),
  on.failure = NULL,
  logLevel = c("normal", "quiet", "verbose"),
  lint = TRUE,
  metadata = list(),
  forceUpdate = getOption("rsconnect.force.update.apps", FALSE),
  python = NULL,
  forceGeneratePythonEnvironment = FALSE,
  quarto = NULL,
  appVisibility = NULL,
  image = NULL



Directory containing application. Defaults to current working directory.


The files and directories to bundle and deploy (only if upload = TRUE). Can be NULL, in which case all the files in the directory containing the application are bundled, with the exception of any listed in an .rcsignore file. Takes precedence over appFileManifest if both are supplied.


An alternate way to specify the files to be deployed; a file containing the names of the files, one per line, relative to the appDir.


If the application contains more than one document, this parameter indicates the primary one, as a path relative to appDir. Can be NULL, in which case the primary document is inferred from the contents being deployed.


If the application is composed of static files (e.g HTML), this parameter indicates the source document, if any, as a fully qualified path. Deployment information returned by deployments() is associated with the source document.


Name of application (names must be unique within an account). Defaults to the base name of the specified appDir.


Free-form descriptive title of application. Optional; if supplied, will often be displayed in favor of the name. When deploying a new application, you may supply only the appTitle to receive an auto-generated appName.


If updating an application, the ID of the application being updated. Optional unless updating an app owned by another user.


Optional; the kind of content being deployed (e.g. "plot" or "site").


Account to deploy application to. This parameter is only required for the initial deployment of an application when there are multiple accounts configured on the system (see accounts).


Server name. Required only if you use the same account name on multiple servers.


If TRUE (the default) then the application is uploaded from the local system prior to deployment. If FALSE then it is re-deployed using the last version that was uploaded. FALSE is only supported on; TRUE is required on RStudio Connect.


Directory where publish record is written. Can be NULL in which case record will be written to the location specified with appDir.


If true, the system's default web browser will be launched automatically after the app is started. Defaults to TRUE in interactive sessions only. If a function is passed, it will be called after the app is started, with the app URL as a paramter.


Function to be called if the deployment fails. If a deployment log URL is available, it's passed as a parameter.


One of "quiet", "normal" or "verbose"; indicates how much logging to the console is to be performed. At "quiet" reports no information; at "verbose", a full diagnostic log is captured.


Lint the project before initiating deployment, to identify potentially problematic code?


Additional metadata fields to save with the deployment record. These fields will be returned on subsequent calls to deployments().


If TRUE, update any previously-deployed app without asking. If FALSE, ask to update. If unset, defaults to the value of getOption("rsconnect.force.update.apps", FALSE).


Full path to a python binary for use by reticulate. Required if reticulate is a dependency of the app being deployed. If python = NULL, and RETICULATE_PYTHON or RETICULATE_PYTHON_FALLBACK is set in the environment, its value will be used. The specified python binary will be invoked to determine its version and to list the python packages installed in the environment.


Optional. If an existing requirements.txt file is found, it will be overwritten when this argument is TRUE.


Optional. Full path to a Quarto binary for use deploying Quarto content. The provided Quarto binary will be used to run quarto inspect to gather information about the content.


One of NULL, "private", or "public"; the visibility of the deployment. When NULL', no change to visibility is made. Currently has an effect only on deployments to


Optional. The name of the image to use when building and executing this content. If none is provided, RStudio Connect will attempt to choose an image based on the content requirements.

See Also

applications(), terminateApp(), and restartApp()

Other Deployment functions: applications(), deployAPI(), deployDoc(), deploySite(), deployTFModel()


## Not run: 

# deploy the application in the current working dir

# deploy an application in another directory

# deploy using an alternative application name and title
deployApp("~/projects/shiny/app1", appName = "myapp",
          appTitle = "My Application")

# deploy specifying an explicit account name, then
# redeploy with no arguments (will automatically use
# the previously specified account)
deployApp(account = "jsmith")

# deploy but don't launch a browser when completed
deployApp(launch.browser = FALSE)

# deploy a Quarto website, using the quarto package to
# find the Quarto binary
deployApp("~/projects/quarto/site1", quarto = quarto::quarto_path())

## End(Not run)

rsconnect documentation built on June 1, 2022, 1:07 a.m.