Title: | Deploy Docs, Apps, and APIs to 'Posit Connect', 'shinyapps.io', and 'RPubs' |
---|---|
Description: | Programmatic deployment interface for 'RPubs', 'shinyapps.io', and 'Posit Connect'. Supported content types include R Markdown documents, Shiny applications, Plumber APIs, plots, and static web content. |
Authors: | Aron Atkins [aut, cre], Toph Allen [aut], Hadley Wickham [aut], Jonathan McPherson [aut], JJ Allaire [aut], Posit Software, PBC [cph, fnd] |
Maintainer: | Aron Atkins <[email protected]> |
License: | GPL-2 |
Version: | 1.3.2.9000 |
Built: | 2024-10-28 17:14:39 UTC |
Source: | https://github.com/rstudio/rsconnect |
Functions to enumerate and remove accounts on the local system. Prior to deploying applications you need to register your account on the local system.
accounts(server = NULL) accountInfo(name = NULL, server = NULL) removeAccount(name = NULL, server = NULL)
accounts(server = NULL) accountInfo(name = NULL, server = NULL) removeAccount(name = NULL, server = NULL)
server |
Name of the server on which the account is registered
(optional; see |
name |
Name of account |
You register an account using the setAccountInfo()
function (for
ShinyApps) or connectUser()
function (for other servers). You can
subsequently remove the account using the removeAccount
function.
The accounts
and accountInfo
functions are provided for viewing
previously registered accounts.
accounts
returns a data frame with the names of all accounts
registered on the system and the servers on which they reside.
accountInfo
returns a list with account details.
Other Account functions:
connectApiUser()
,
setAccountInfo()
Show account usage
accountUsage( account = NULL, server = NULL, usageType = "hours", from = NULL, until = NULL, interval = NULL )
accountUsage( account = NULL, server = NULL, usageType = "hours", from = NULL, until = NULL, interval = NULL )
account , server
|
Uniquely identify a remote server with either your
user Use |
usageType |
Use metric to retreive (for example: "hours") |
from |
Date range starting timestamp (Unix timestamp or relative time delta such as "2d" or "3w"). |
until |
Date range ending timestamp (Unix timestamp or relative time delta such as "2d" or "3w"). |
interval |
Summarization interval. Data points at intervals less then this will be grouped. (Number of seconds or relative time delta e.g. "1h"). |
This function only works for ShinyApps servers.
Add authorized user to application
addAuthorizedUser( email, appDir = getwd(), appName = NULL, account = NULL, server = NULL, sendEmail = NULL, emailMessage = NULL )
addAuthorizedUser( email, appDir = getwd(), appName = NULL, account = NULL, server = NULL, sendEmail = NULL, emailMessage = NULL )
email |
Email address of user to add. |
appDir |
Directory containing application. Defaults to current working directory. |
appName |
Name of application. |
account , server
|
Uniquely identify a remote server with either your
user Use |
sendEmail |
Send an email letting the user know the application has been shared with them. |
emailMessage |
Optional character vector of length 1 containing a custom message to send in email invitation. Defaults to NULL, which will use default invitation message. |
This function works only for ShinyApps servers.
removeAuthorizedUser()
and showUsers()
Add a linter, to be used in subsequent calls to lint()
.
Add a linter, to be used in subsequent calls to lint()
.
addLinter(name, linter) addLinter(name, linter)
addLinter(name, linter) addLinter(name, linter)
name |
The name of the linter, as a string. |
linter |
A |
addLinter("no.capitals", linter( ## Identify lines containing capital letters -- either by name or by index apply = function(content, ...) { grep("[A-Z]", content) }, ## Only use this linter on R files (paths ending with .r or .R) takes = function(paths) { grep("[rR]$", paths) }, # Use the default message constructor message = function(content, lines, ...) { makeLinterMessage("Capital letters found on the following lines", content, lines) }, # Give a suggested prescription suggest = "Do not use capital letters in these documents." )) addLinter("no.capitals", linter( ## Identify lines containing capital letters -- either by name or by index apply = function(content, ...) { grep("[A-Z]", content) }, ## Only use this linter on R files (paths ending with .r or .R) takes = function(paths) { grep("[rR]$", paths) }, # Use the default message constructor message = function(content, lines, ...) { makeLinterMessage("Capital letters found on the following lines", content, lines) }, # Give a suggested prescription suggest = "Do not use capital letters in these documents." ))
addLinter("no.capitals", linter( ## Identify lines containing capital letters -- either by name or by index apply = function(content, ...) { grep("[A-Z]", content) }, ## Only use this linter on R files (paths ending with .r or .R) takes = function(paths) { grep("[rR]$", paths) }, # Use the default message constructor message = function(content, lines, ...) { makeLinterMessage("Capital letters found on the following lines", content, lines) }, # Give a suggested prescription suggest = "Do not use capital letters in these documents." )) addLinter("no.capitals", linter( ## Identify lines containing capital letters -- either by name or by index apply = function(content, ...) { grep("[A-Z]", content) }, ## Only use this linter on R files (paths ending with .r or .R) takes = function(paths) { grep("[rR]$", paths) }, # Use the default message constructor message = function(content, lines, ...) { makeLinterMessage("Capital letters found on the following lines", content, lines) }, # Give a suggested prescription suggest = "Do not use capital letters in these documents." ))
These functions manage the list of known servers:
addServer()
registers a Posit connect server. Once it has been
registered, you can connect to an account on the server using
connectUser()
.
removeServer()
removes a server from the registry.
addServerCertificate()
adds a certificate to a server.
addServer(url, name = NULL, certificate = NULL, validate = TRUE, quiet = FALSE) removeServer(name = NULL) addServerCertificate(name, certificate, quiet = FALSE)
addServer(url, name = NULL, certificate = NULL, validate = TRUE, quiet = FALSE) removeServer(name = NULL) addServerCertificate(name, certificate, quiet = FALSE)
url |
URL for the server. Can be a bare hostname like
|
name |
Server name. If omitted, the server hostname is used. |
certificate |
Optional. Either a path to certificate file or a character vector containing the certificate's contents. |
validate |
Validate that |
quiet |
Suppress output and prompts where possible. |
## Not run: # register a local server addServer("http://myrsconnect/", "myserver") # list servers servers(local = TRUE) # connect to an account on the server connectUser(server = "myserver") ## End(Not run)
## Not run: # register a local server addServer("http://myrsconnect/", "myserver") # list servers servers(local = TRUE) # connect to an account on the server connectUser(server = "myserver") ## End(Not run)
appDependencies()
recursively detects all R package dependencies for an
application by parsing all .R
and .Rmd
files and looking for calls
to library()
, require()
, requireNamespace()
, ::
, and so on.
It then adds implicit dependencies (i.e. an .Rmd
requires Rmarkdown)
and adds all recursive dependencies to create a complete manifest of
package packages need to be installed to run the app.
appDependencies( appDir = getwd(), appFiles = NULL, appFileManifest = NULL, appMode = NULL )
appDependencies( appDir = getwd(), appFiles = NULL, appFileManifest = NULL, appMode = NULL )
appDir |
A directory containing an application (e.g. a Shiny app or plumber API). Defaults to the current directory. |
appFiles , appFileManifest
|
Use |
appMode |
Optional; the type of content being deployed.
Provide this option when the inferred type of content is incorrect. This
can happen, for example, when static HTML content includes a downloadable
Shiny application |
A data frame with one row for each dependency (direct, indirect, and inferred), and 4 columns:
Package
: package name.
Version
: local version.
Source
: a short string describing the source of the package install,
as described above.
Repository
: for CRAN and CRAN-like repositories, the URL to the
repository. This will be ignored by the server if it has been configured
with its own repository name -> repository URL mapping.
rsconnect use one of three mechanisms to find which packages your application uses:
If renv.lock
is present, it will use the versions and sources defined in
that file. If you're using the lockfile for some other purpose and
don't want it to affect deployment, add renv.lock
to .rscignore
.
Otherwise, rsconnect will call renv::snapshot()
to find all packages
used by your code. If you'd instead prefer to only use the packages
declared in a DESCRIPTION
file, run
renv::settings$snapshot.type("explicit")
to activate renv's "explicit"
mode.
Dependency resolution using renv is a new feature in rsconnect 1.0.0, and
while we have done our best to test it, it still might fail for your app.
If this happens, please file an issue
then set options(rsconnect.packrat = TRUE)
to revert to the old
dependency discovery mechanism.
When deployed, the app must first install all of these packages, and rsconnect ensures the versions used on the server will match the versions you used locally. It knows how to install packages from the following sources:
CRAN and BioConductor (Source: CRAN
or Source: Bioconductor
). The
remote server will ignore the specific CRAN or Bioconductor mirror that
you use locally, always using the CRAN/BioC mirror that has been configured
on the server.
Other CRAN like and CRAN-like repositories. These packages will have
a Source
determined by the value of getOptions("repos")
. For example,
if you've set the following options:
options( repos = c( CRAN = "https://cran.rstudio.com/", CORPORATE = "https://corporate-packages.development.company.com" ) )
Then packages installed from your corporate package repository will
have source CORPORATE
. Posit Connect
can be configured
to override their repository url so that (e.g.) you can use different
packages versions on staging and production servers.
Packages installed from GitHub, GitLab, or BitBucket, have Source
github
, gitlab
, and bitbucket
respectively. When deployed, the
bundle contains the additional metadata needed to precisely recreated
the installed version.
It's not possible to recreate the packages that you have built and installed
from a directory on your local computer. This will have Source: NA
and
will cause the deployment to error. To resolve this issue, you'll need to
install from one of the known sources described above.
The Suggests
field is not included when determining recursive dependencies,
so it's possible that not every package required to run your application will
be detected.
For example, ggplot2's geom_hex()
requires the hexbin package to be
installed, but it is only suggested by ggplot2. So if your app uses
geom_hex()
it will fail, reporting that the hexbin package is not
installed.
You can overcome this problem with (e.g.) requireNamespace(hexbin)
.
This will tell rsconnect that your app needs the hexbin package, without
otherwise affecting your code.
rsconnectPackages(Using Packages with rsconnect)
## Not run: # dependencies for the app in the current working dir appDependencies() # dependencies for an app in another directory appDependencies("~/projects/shiny/app1") ## End(Not run)
## Not run: # dependencies for the app in the current working dir appDependencies() # dependencies for an app in another directory appDependencies("~/projects/shiny/app1") ## End(Not run)
List all applications currently deployed for a given account.
applications(account = NULL, server = NULL)
applications(account = NULL, server = NULL)
account , server
|
Uniquely identify a remote server with either your
user Use |
Returns a data frame with the following columns:
id |
Application unique id |
name |
Name of application |
title |
Application title |
url |
URL where application can be accessed |
status |
Current status of application. Valid values are pending ,
deploying , running , terminating , and terminated |
size |
Instance size (small, medium, large, etc.) (on ShinyApps.io) |
instances |
Number of instances (on ShinyApps.io) |
config_url |
URL where application can be configured |
To register an account you call the setAccountInfo()
function.
Other Deployment functions:
deployAPI()
,
deployApp()
,
deployDoc()
,
deploySite()
,
deployTFModel()
## Not run: # list all applications for the default account applications() # list all applications for a specific account applications("myaccount") # view the list of applications in the data viewer View(applications()) ## End(Not run)
## Not run: # list all applications for the default account applications() # list all applications for a specific account applications("myaccount") # view the list of applications in the data viewer View(applications()) ## End(Not run)
(Deprecated) List authorized users for an application
authorizedUsers(appDir = getwd())
authorizedUsers(appDir = getwd())
appDir |
Directory containing application. Defaults to current working directory. |
Configure an application running on a remote server.
configureApp( appName, appDir = getwd(), account = NULL, server = NULL, redeploy = TRUE, size = NULL, instances = NULL, logLevel = c("normal", "quiet", "verbose") )
configureApp( appName, appDir = getwd(), account = NULL, server = NULL, redeploy = TRUE, size = NULL, instances = NULL, logLevel = c("normal", "quiet", "verbose") )
appName |
Name of application to configure |
appDir |
Directory containing application. Defaults to current working directory. |
account , server
|
Uniquely identify a remote server with either your
user Use |
redeploy |
Re-deploy application after its been configured. |
size |
Configure application instance size |
instances |
Configure number of application instances |
logLevel |
One of |
This function works only for ShinyApps servers.
## Not run: # set instance size for an application configureApp("myapp", size="xlarge") ## End(Not run)
## Not run: # set instance size for an application configureApp("myapp", size="xlarge") ## End(Not run)
connectUser()
and connectApiUser()
connect your Posit Connect account to
the rsconnect package so that it can deploy and manage applications on
your behalf.
connectUser()
is the easiest place to start because it allows you to
authenticate in-browser to your Posit Connect server. connectApiUser()
is
appropriate for non-interactive settings; you'll need to copy-and-paste the
API key from your account settings.
connectApiUser(account = NULL, server = NULL, apiKey, quiet = FALSE) connectUser( account = NULL, server = NULL, quiet = FALSE, launch.browser = getOption("rsconnect.launch.browser", interactive()) )
connectApiUser(account = NULL, server = NULL, apiKey, quiet = FALSE) connectUser( account = NULL, server = NULL, quiet = FALSE, launch.browser = getOption("rsconnect.launch.browser", interactive()) )
account |
A name for the account to connect. |
server |
The server to connect to. |
apiKey |
The API key used to authenticate the user |
quiet |
Whether or not to show messages and prompts while connecting the account. |
launch.browser |
If true, the system's default web browser will be
launched automatically after the app is started. Defaults to |
Other Account functions:
accounts()
,
setAccountInfo()
Deploys an application consisting of plumber API routes. The given directory
must contain a script returning a plumb
object or a plumber API definition.
deployAPI(api, ...)
deployAPI(api, ...)
api |
Path to the API project directory. Must contain either
|
... |
Additional arguments to |
Deploy a plumber API definition by either supplying a directory
containing plumber.R
(an API definition) or entrypoint.R
that returns a
plumb
object created by plumber::plumb()
. See the plumber documentation
for more information.
Other Deployment functions:
applications()
,
deployApp()
,
deployDoc()
,
deploySite()
,
deployTFModel()
Deploy a shiny application, an RMarkdown document, a plumber API, or HTML content to a server.
deployApp( appDir = getwd(), appFiles = NULL, appFileManifest = NULL, appPrimaryDoc = NULL, appSourceDoc = NULL, appName = NULL, appTitle = NULL, envVars = NULL, appId = NULL, appMode = NULL, contentCategory = NULL, account = NULL, server = NULL, upload = TRUE, recordDir = NULL, launch.browser = getOption("rsconnect.launch.browser", is_interactive()), on.failure = NULL, logLevel = c("normal", "quiet", "verbose"), lint = TRUE, metadata = list(), forceUpdate = NULL, python = NULL, forceGeneratePythonEnvironment = FALSE, quarto = NA, appVisibility = NULL, image = NULL, envManagement = NULL, envManagementR = NULL, envManagementPy = NULL, space = NULL )
deployApp( appDir = getwd(), appFiles = NULL, appFileManifest = NULL, appPrimaryDoc = NULL, appSourceDoc = NULL, appName = NULL, appTitle = NULL, envVars = NULL, appId = NULL, appMode = NULL, contentCategory = NULL, account = NULL, server = NULL, upload = TRUE, recordDir = NULL, launch.browser = getOption("rsconnect.launch.browser", is_interactive()), on.failure = NULL, logLevel = c("normal", "quiet", "verbose"), lint = TRUE, metadata = list(), forceUpdate = NULL, python = NULL, forceGeneratePythonEnvironment = FALSE, quarto = NA, appVisibility = NULL, image = NULL, envManagement = NULL, envManagementR = NULL, envManagementPy = NULL, space = NULL )
appDir |
A directory containing an application (e.g. a Shiny app or plumber API). Defaults to the current directory. |
appFiles , appFileManifest
|
Use |
appPrimaryDoc |
If the application contains more than one document, this
parameter indicates the primary one, as a path relative to |
appSourceDoc |
|
appName |
Application name, a string consisting of letters, numbers,
If not specified, the first deployment will be automatically it from the
|
appTitle |
Free-form descriptive title of application. Optional; if supplied, will often be displayed in favor of the name. If ommitted, on second and subsequent deploys, the title will be unchanged. |
envVars |
A character vector giving the names of environment variables whose values should be synchronised with the server (currently supported by Connect only). The values of the environment variables are sent over an encrypted connection and are not stored in the bundle, making this a safe way to send private data to Connect. The names (not values) are stored in the deployment record so that future
deployments will automatically update their values. Other environment
variables on the server will not be affected. This means that removing an
environment variable from Environment variables are set prior to deployment so that your code can use them and the first deployment can still succeed. Note that means that if the deployment fails, the values will still be updated. |
appId |
Use this to deploy to an exact known application, ignoring all
existing deployment records and You can use this to update an existing application that is missing a
deployment record. If you're re-deploying an application that you
created it's generally easier to use You can find the
|
appMode |
Optional; the type of content being deployed.
Provide this option when the inferred type of content is incorrect. This
can happen, for example, when static HTML content includes a downloadable
Shiny application |
contentCategory |
Optional; classifies the kind of content being
deployed (e.g. |
account , server
|
Uniquely identify a remote server with either your
user Use |
upload |
If |
recordDir |
Directory where deployment record is written. The default,
|
launch.browser |
If true, the system's default web browser will be
launched automatically after the app is started. Defaults to |
on.failure |
Function to be called if the deployment fails. If a deployment log URL is available, it's passed as a parameter. |
logLevel |
One of |
lint |
Lint the project before initiating deployment, to identify potentially problematic code? |
metadata |
Additional metadata fields to save with the deployment
record. These fields will be returned on subsequent calls to
Multi-value fields are recorded as comma-separated values and returned in that form. Custom value serialization is the responsibility of the caller. |
forceUpdate |
What should happen if there's no deployment record for
the app, but there's an app with the same name on the server? If Defaults to |
python |
Full path to a python binary for use by |
forceGeneratePythonEnvironment |
Optional. If an existing
|
quarto |
Should the deployed content be built by quarto?
( (This option is ignored and quarto will always be used if the
|
appVisibility |
One of |
image |
Optional. The name of the image to use when building and
executing this content. If none is provided, Posit Connect will
attempt to choose an image based on the content requirements. You can
override the default by setting the environment variable |
envManagement |
Optional. Should Posit Connect install R and Python
packages for this content? ( (This option is a shorthand flag which overwrites the values of both
|
envManagementR |
Optional. Should Posit Connect install R packages
for this content? ( (This option is ignored when |
envManagementPy |
Optional. Should Posit Connect install Python packages
for this content? ( (This option is ignored when |
space |
Optional. For Posit Cloud, the id of the space where the content should be deployed. If none is provided, content will be deployed to the deploying user's workspace or deployed to the same space in case of redeploy. |
When deploying an app, deployApp()
will save a deployment record that
makes it easy to update the app on server from your local source code. This
generally means that you need to only need to supply important arguments
(e.g. appName
, appTitle
, server
/account
) on the first deploy, and
rsconnect will reuse the same settings on subsequent deploys.
The metadata needs to make this work is stored in {appDir}/rsconnect/
.
You should generally check these files into version control to ensure that
future you and other collaborators will publish to the same location.
If you have lost this directory, all is not lost, as deployApp()
will
attempt to rediscover existing deployments. This is easiest if you are
updating an app that you created, as you can just supply the appName
(and server
/account
if you have multiple accounts) and deployApp()
will find the existing application account. If you need to update an app
that was created by someone else (that you have write permission) for, you'll
instead need to supply the appId
.
applications()
, terminateApp()
, and restartApp()
Other Deployment functions:
applications()
,
deployAPI()
,
deployDoc()
,
deploySite()
,
deployTFModel()
## Not run: # deploy the application in the current working dir deployApp() # deploy an application in another directory deployApp("~/projects/shiny/app1") # 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") deployApp() # 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") # deploy application with environment variables # (e.g., `SECRET_PASSWORD=XYZ` is set via an ~/.Renviron file) rsconnect::deployApp(envVars = c("SECRET_PASSWORD")) ## End(Not run)
## Not run: # deploy the application in the current working dir deployApp() # deploy an application in another directory deployApp("~/projects/shiny/app1") # 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") deployApp() # 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") # deploy application with environment variables # (e.g., `SECRET_PASSWORD=XYZ` is set via an ~/.Renviron file) rsconnect::deployApp(envVars = c("SECRET_PASSWORD")) ## End(Not run)
Deploys a single R Markdown, Quarto document, or other file (e.g. .html
or
.pdf
).
When deploying an .Rmd
, .Qmd
, or .html
, deployDoc()
will attempt to
automatically discover dependencies using rmarkdown::find_external_resources()
,
and include an .Rprofile
if present. If you find that the document is
missing dependencies, either specify the dependencies explicitly in the
document (see rmarkdown::find_external_resources()
for details), or call
deployApp()
directly and specify your own file list in appFiles
.
deployDoc(doc, ..., logLevel = c("normal", "quiet", "verbose"))
deployDoc(doc, ..., logLevel = c("normal", "quiet", "verbose"))
doc |
Path to the document to deploy. |
... |
Additional arguments to |
logLevel |
One of |
Other Deployment functions:
applications()
,
deployAPI()
,
deployApp()
,
deploySite()
,
deployTFModel()
## Not run: deployDoc("my-report.Rmd") deployDoc("static-file.html") ## End(Not run)
## Not run: deployDoc("my-report.Rmd") deployDoc("static-file.html") ## End(Not run)
List deployment records for a given application.
deployments( appPath = ".", nameFilter = NULL, accountFilter = NULL, serverFilter = NULL, excludeOrphaned = TRUE )
deployments( appPath = ".", nameFilter = NULL, accountFilter = NULL, serverFilter = NULL, excludeOrphaned = TRUE )
appPath |
The path to the content that was deployed, either a directory or an individual document. |
nameFilter |
Return only deployments matching the given name (optional) |
accountFilter |
Return only deployments matching the given account (optional) |
serverFilter |
Return only deployments matching the given server (optional) |
excludeOrphaned |
If |
Returns a data frame with at least following columns:
name |
Name of deployed application |
account |
Account owning deployed application |
bundleId |
Identifier of deployed application's bundle |
url |
URL of deployed application |
deploymentFile |
Name of configuration file |
If additional metadata has been saved with the deployment record using the
metadata
argument to deployApp()
, the frame will include
additional columns.
applications()
to get a list of deployments from the
server, and deployApp()
to create a new deployment.
## Not run: # Return all deployments of the ~/r/myapp directory made with the 'abc' # account deployments("~/r/myapp", accountFilter="abc") ## End(Not run)
## Not run: # Return all deployments of the ~/r/myapp directory made with the 'abc' # account deployments("~/r/myapp", accountFilter="abc") ## End(Not run)
Deploy an R Markdown or quarto website to a server.
deploySite( siteDir = getwd(), siteName = NULL, siteTitle = NULL, account = NULL, server = NULL, render = c("none", "local", "server"), launch.browser = getOption("rsconnect.launch.browser", interactive()), logLevel = c("normal", "quiet", "verbose"), lint = FALSE, metadata = list(), python = NULL, recordDir = NULL, ... )
deploySite( siteDir = getwd(), siteName = NULL, siteTitle = NULL, account = NULL, server = NULL, render = c("none", "local", "server"), launch.browser = getOption("rsconnect.launch.browser", interactive()), logLevel = c("normal", "quiet", "verbose"), lint = FALSE, metadata = list(), python = NULL, recordDir = NULL, ... )
siteDir |
Directory containing website. Defaults to current directory. |
siteName |
Name for the site (names must be unique within
an account). Defaults to the base name of the specified |
siteTitle |
Title for the site. For quarto sites only, if not
supplied uses the title recorded in |
account , server
|
Uniquely identify a remote server with either your
user Use |
render |
Rendering behavior for site:
Note that for |
launch.browser |
If true, the system's default web browser will be
launched automatically after the app is started. Defaults to |
logLevel |
One of |
lint |
Lint the project before initiating deployment, to identify potentially problematic code? |
metadata |
Additional metadata fields to save with the deployment
record. These fields will be returned on subsequent calls to
Multi-value fields are recorded as comma-separated values and returned in that form. Custom value serialization is the responsibility of the caller. |
python |
Full path to a python binary for use by |
recordDir |
The default, |
... |
Additional arguments to |
Other Deployment functions:
applications()
,
deployAPI()
,
deployApp()
,
deployDoc()
,
deployTFModel()
Deploys a directory containing a TensorFlow saved model.
deployTFModel(...)
deployTFModel(...)
... |
Additional arguments to |
Other Deployment functions:
applications()
,
deployAPI()
,
deployApp()
,
deployDoc()
,
deploySite()
Forgets about an application deployment. This is useful if the application has been deleted on the server, or the local deployment information needs to be reset.
forgetDeployment( appPath = getwd(), name = NULL, account = NULL, server = NULL, dryRun = FALSE, force = !interactive() )
forgetDeployment( appPath = getwd(), name = NULL, account = NULL, server = NULL, dryRun = FALSE, force = !interactive() )
appPath |
The path to the content that was deployed, either a directory or an individual document. |
name |
The name of the content that was deployed (optional) |
account |
The name of the account to which the content was deployed (optional) |
server |
The name of the server to which the content was deployed (optional) |
dryRun |
Set to TRUE to preview the files/directories to be removed instead of actually removing them. Defaults to FALSE. |
force |
Set to TRUE to remove files and directories without prompting. Defaults to FALSE in interactive sessions. |
This method removes from disk the file containing deployment metadata. If "name", "account", and "server" are all NULL, then all of the deployments for the application are forgotten; otherwise, only the specified deployment is forgotten.
NULL, invisibly.
Takes the set of active linters (see addLinter()
), and applies
them to all files within a project.
lint(project, files = NULL, appPrimaryDoc = NULL)
lint(project, files = NULL, appPrimaryDoc = NULL)
project |
Path to a project directory. |
files |
Specific files to lint. Can be NULL, in which case all the files in the directory will be linted. |
appPrimaryDoc |
The primary file in the project directory. Can be NULL, in which case it's inferred (if possible) from the directory contents. |
Generate a linter, which can identify errors or problematic regions in a project.
Generate a linter, which can identify errors or problematic regions in a project.
linter(apply, takes, message, suggestion) linter(apply, takes, message, suggestion)
linter(apply, takes, message, suggestion) linter(apply, takes, message, suggestion)
apply |
Function that, given the content of a file, returns the indices at which problems were found. |
takes |
Function that, given a set of paths, returns the subset of paths that this linter uses. |
message |
Function that, given content and lines, returns an
informative message for the user. Typically generated with
|
suggestion |
String giving a prescribed fix for the linted problem. |
addLinter("no.capitals", linter( ## Identify lines containing capital letters -- either by name or by index apply = function(content, ...) { grep("[A-Z]", content) }, ## Only use this linter on R files (paths ending with .r or .R) takes = function(paths) { grep("[rR]$", paths) }, # Use the default message constructor message = function(content, lines, ...) { makeLinterMessage("Capital letters found on the following lines", content, lines) }, # Give a suggested prescription suggest = "Do not use capital letters in these documents." )) addLinter("no.capitals", linter( ## Identify lines containing capital letters -- either by name or by index apply = function(content, ...) { grep("[A-Z]", content) }, ## Only use this linter on R files (paths ending with .r or .R) takes = function(paths) { grep("[rR]$", paths) }, # Use the default message constructor message = function(content, lines, ...) { makeLinterMessage("Capital letters found on the following lines", content, lines) }, # Give a suggested prescription suggest = "Do not use capital letters in these documents." ))
addLinter("no.capitals", linter( ## Identify lines containing capital letters -- either by name or by index apply = function(content, ...) { grep("[A-Z]", content) }, ## Only use this linter on R files (paths ending with .r or .R) takes = function(paths) { grep("[rR]$", paths) }, # Use the default message constructor message = function(content, lines, ...) { makeLinterMessage("Capital letters found on the following lines", content, lines) }, # Give a suggested prescription suggest = "Do not use capital letters in these documents." )) addLinter("no.capitals", linter( ## Identify lines containing capital letters -- either by name or by index apply = function(content, ...) { grep("[A-Z]", content) }, ## Only use this linter on R files (paths ending with .r or .R) takes = function(paths) { grep("[rR]$", paths) }, # Use the default message constructor message = function(content, lines, ...) { makeLinterMessage("Capital letters found on the following lines", content, lines) }, # Give a suggested prescription suggest = "Do not use capital letters in these documents." ))
listAccountEnvVars()
lists the environment variables used by
every application published to the specified account.
updateAccountEnvVars()
updates the specified environment variables with
their current values for every app that uses them.
Secure environment variable are currently only supported by Posit Connect so other server types will generate an error.
listAccountEnvVars(server = NULL, account = NULL) updateAccountEnvVars(envVars, server = NULL, account = NULL)
listAccountEnvVars(server = NULL, account = NULL) updateAccountEnvVars(envVars, server = NULL, account = NULL)
account , server
|
Uniquely identify a remote server with either your
user Use |
envVars |
Names of environment variables to update. Their values will be automatically retrieved from the current process. If you specify multiple environment variables, any application that uses any of them will be updated with all of them. |
listAccountEnvVars()
returns a data frame with one row
for each data frame. It has variables id
, guid
, name
, and
envVars
. envVars
is a list-column.
Given an app directory, and optional appFiles
and appFileManifest
arguments, returns vector of paths to bundle in the app. (Note that
documents follow a different strategy; see deployDoc()
for details.)
When neither appFiles
nor appFileManifest
is supplied,
listDeploymentFiles()
will include all files under appDir
, apart
from the following:
Certain files and folders that don't need to be bundled, such as version control directories, internal config files, and RStudio state, are automatically excluded.
You can exclude additional files by listing them in in a .rscignore
file. This file must have one file or directory per line (with path
relative to the current directory). It doesn't support wildcards, or
ignoring files in subdirectories.
listDeploymentFiles()
will throw an error if the total file size exceeds
the maximum bundle size (as controlled by option rsconnect.max.bundle.size
),
or the number of files exceeds the maximum file limit (as controlled by
option rsconnect.max.bundle.files
). This prevents you from accidentally
bundling a very large direcfory (i.e. you home directory).
listDeploymentFiles( appDir, appFiles = NULL, appFileManifest = NULL, error_call = caller_env() )
listDeploymentFiles( appDir, appFiles = NULL, appFileManifest = NULL, error_call = caller_env() )
appDir |
A directory containing an application (e.g. a Shiny app or plumber API). Defaults to the current directory. |
appFiles , appFileManifest
|
Use |
error_call |
The call or environment for error reporting; expert use only. |
Character of paths to bundle, relative to appDir
.
Pretty-prints a linter message. Primarily used as a helper
for constructing linter messages with linter()
.
makeLinterMessage(header, content, lines)
makeLinterMessage(header, content, lines)
header |
A header message describing the linter. |
content |
The content of the file that was linted. |
lines |
The line numbers from |
Purge a currently archived ShinyApps application.
purgeApp(appName, account = NULL, server = NULL, quiet = FALSE)
purgeApp(appName, account = NULL, server = NULL, quiet = FALSE)
appName |
Name of application to purge |
account |
Account name. If a single account is registered on the system then this parameter can be omitted. |
server |
Server name. Required only if you use the same account name on
multiple servers (see |
quiet |
Request that no status information be printed to the console during the termination. |
This function only works for ShinyApps servers.
applications()
, deployApp()
, and
restartApp()
## Not run: # purge an application purgeApp("myapp") ## End(Not run)
## Not run: # purge an application purgeApp("myapp") ## End(Not run)
Remove authorized user from an application
removeAuthorizedUser( user, appDir = getwd(), appName = NULL, account = NULL, server = NULL )
removeAuthorizedUser( user, appDir = getwd(), appName = NULL, account = NULL, server = NULL )
user |
The user to remove. Can be id or email address. |
appDir |
Directory containing application. Defaults to current working directory. |
appName |
Name of application. |
account , server
|
Uniquely identify a remote server with either your
user Use |
This function works only for ShinyApps servers.
addAuthorizedUser()
and showUsers()
Resend invitation for invited users of an application
resendInvitation( invite, regenerate = FALSE, appDir = getwd(), appName = NULL, account = NULL, server = NULL )
resendInvitation( invite, regenerate = FALSE, appDir = getwd(), appName = NULL, account = NULL, server = NULL )
invite |
The invitation to resend. Can be id or email address. |
regenerate |
Regenerate the invite code. Can be helpful is the invitation has expired. |
appDir |
Directory containing application. Defaults to current working directory. |
appName |
Name of application. |
account , server
|
Uniquely identify a remote server with either your
user Use |
This function works only for ShinyApps servers.
Restart an application currently running on a remote server.
restartApp(appName, account = NULL, server = NULL, quiet = FALSE)
restartApp(appName, account = NULL, server = NULL, quiet = FALSE)
appName |
Name of application to restart |
account |
Account name. If a single account is registered on the system then this parameter can be omitted. |
server |
Server name. Required only if you use the same account name on
multiple servers (see |
quiet |
Request that no status information be printed to the console during the operation. |
This function works only for ShinyApps servers.
applications()
, deployApp()
, and
terminateApp()
## Not run: # restart an application restartApp("myapp") ## End(Not run)
## Not run: # restart an application restartApp("myapp") ## End(Not run)
This function publishes a file to rpubs.com. If the upload succeeds a
list that includes an id
and continueUrl
is returned. A browser
should be opened to the continueUrl
to complete publishing of the
document. If an error occurs then a diagnostic message is returned in the
error
element of the list.
rpubsUpload(title, contentFile, originalDoc, id = NULL, properties = list())
rpubsUpload(title, contentFile, originalDoc, id = NULL, properties = list())
title |
The title of the document. |
contentFile |
The path to the content file to upload. |
originalDoc |
The document that was rendered to produce the
|
id |
If this upload is an update of an existing document then the id
parameter should specify the document id to update. Note that the id is
provided as an element of the list returned by successful calls to
|
properties |
A named list containing additional document properties (RPubs doesn't currently expect any additional properties, this parameter is reserved for future use). |
A named list. If the upload was successful then the list contains a
id
element that can be used to subsequently update the document as
well as a continueUrl
element that provides a URL that a browser
should be opened to in order to complete publishing of the document. If the
upload fails then the list contains an error
element which contains
an explanation of the error that occurred.
## Not run: # upload a document result <- rpubsUpload("My document title", "Document.html") if (!is.null(result$continueUrl)) browseURL(result$continueUrl) else stop(result$error) # update the same document with a new title updateResult <- rpubsUpload("My updated title", "Document.html", id = result$id) ## End(Not run)
## Not run: # upload a document result <- rpubsUpload("My document title", "Document.html") if (!is.null(result$continueUrl)) browseURL(result$continueUrl) else stop(result$error) # update the same document with a new title updateResult <- rpubsUpload("My updated title", "Document.html", id = result$id) ## End(Not run)
The rsconnect package supports several options that control the method used for http communications, the printing of diagnostic information for http requests, and the launching of an external browser after deployment.
Supported global options include:
rsconnect.ca.bundle
Path to a custom bundle of Certificate Authority root certificates to use when connecting to servers via SSL. This option can also be specied in the environment variable RSCONNECT_CA_BUNDLE
. Leave undefined to use your system's default certificate store.
rsconnect.check.certificate
Whether to check the SSL certificate when connecting to a remote host; defaults to TRUE
. Setting to FALSE
is insecure, but will allow you to connect to hosts using invalid certificates as a last resort.
rsconnect.http
Http implementation used for connections to the back-end service:
libcurl |
Secure https using the curl R package |
rcurl |
Secure https using the Rcurl R package (deprecated) |
curl |
Secure https using the curl system utility |
internal |
Insecure http using raw sockets |
If no option is specified then libcurl
is used by default.
rsconnect.http.trace
When TRUE
, trace http calls (prints the method, path, and total milliseconds for each http request)
rsconnect.http.trace.json
When TRUE
, trace JSON content (shows JSON payloads sent to and received from the server))
rsconnect.http.verbose
When TRUE
, print verbose output for http connections (useful only for debugging SSL certificate or http connection problems)
rsconnect.tar
By default, rsconnect
uses R's internal tar
implementation to compress content bundles. This may cause invalid bundles in some environments. In those cases, use this option to specify a path to an alternate tar
executable. This option can also be specified in the environment variable RSCONNECT_TAR
. Leave undefined to use the default tar
implementation.
rsconnect.rcurl.options
A named list of additional cURL options to use when using the RCurl HTTP implementation in R. Run RCurl::curlOptions()
to see available options.
rsconnect.libcurl.options
A named list of additional cURL options to use when using the curl HTTP implementation in R. Run curl::curl_options()
to see available options.
rsconnect.error.trace
When TRUE
, print detailed stack traces for errors occurring during deployment.
rsconnect.launch.browser
When TRUE
, automatically launch a browser to view applications after they are deployed
rsconnect.locale.cache
When FALSE
, disable the detected locale cache (Windows only).
rsconnect.locale
Override the detected locale.
rsconnect.max.bundle.size
The maximum size, in bytes, for deployed content. If not set, defaults to 3 GB.
rsconnect.max.bundle.files
The maximum number of files to deploy. If not set, defaults to 10,000.
rsconnect.force.update.apps
When TRUE
, bypasses the prompt to confirm whether you wish to update previously-deployed content
rsconnect.pre.deploy
A function to run prior to deploying content; it receives as an argument the directory containing the content about to be deployed.
rsconnect.post.deploy
A function to run after successfully deploying content; it receives as an argument the directory containing the content about to be deployed.
rsconnect.python.enabled
When TRUE
, use the python executable specified by the RETICULATE_PYTHON
environment variable and add a python
section to the deployment manifest. By default, python is enabled when deploying to Posit Connect and disabled when deploying to shinyapps.io.
When deploying content from the RStudio IDE, the rsconnect package's deployment methods are executed in a vanilla R session that doesn't execute startup scripts. This can make it challenging to ensure options are set properly prior to push-button deployment, so the rsconnect package has a parallel set of “startup” scripts it runs prior to deploying. The follow are run in order, if they exist, prior to deployment:
$R_HOME/etc/rsconnect.site
Like Rprofile.site
; for site-wide pre-flight and options.
~/.rsconnect_profile
Like .Rprofile
; for user-specific content.
$PROJECT/.rsconnect_profile
Like .Rprofile
for projects; $PROJECT
here refers to the root directory of the content being deployed.
Note that, unlike .Rprofile
, these files don't replace each other; all three will be run if they exist.
## Not run: # use curl for http connections options(rsconnect.http = "curl") # trace http requests options(rsconnect.http.trace = TRUE) # print verbose output for http requests options(rsconnect.http.verbose = TRUE) # print JSON content options(rsconnect.http.trace.json = TRUE) # don't automatically launch a browser after deployment options(rsconnect.launch.browser = FALSE) ## End(Not run)
## Not run: # use curl for http connections options(rsconnect.http = "curl") # trace http requests options(rsconnect.http.trace = TRUE) # print verbose output for http requests options(rsconnect.http.verbose = TRUE) # print JSON content options(rsconnect.http.trace.json = TRUE) # don't automatically launch a browser after deployment options(rsconnect.launch.browser = FALSE) ## End(Not run)
servers()
lists all known servers; serverInfo()
gets metadata about
a specific server. Cloud servers shinyapps.io
and posit.cloud
are always
automatically registered and available.
servers(local = FALSE) serverInfo(name = NULL)
servers(local = FALSE) serverInfo(name = NULL)
local |
Return only local servers? (i.e. not automatically registered cloud servers) |
name |
Server name. If omitted, you'll be prompted to pick a server. |
servers()
returns a data frame with registered server names and URLs.
serverInfo()
returns a list with details for a particular server.
# List all registered servers servers() # Get information about a server serverInfo("posit.cloud")
# List all registered servers servers() # Get information about a server serverInfo("posit.cloud")
Configure a ShinyApps or Posit Cloud account for publishing from this system.
setAccountInfo(name, token, secret, server = "shinyapps.io")
setAccountInfo(name, token, secret, server = "shinyapps.io")
name |
Name of account to save or remove |
token |
User token for the account |
secret |
User secret for the account |
server |
Server to associate account with. |
Other Account functions:
accounts()
,
connectApiUser()
## Not run: # register an account setAccountInfo("user", "token", "secret") # remove the same account removeAccount("user") ## End(Not run)
## Not run: # register an account setAccountInfo("user", "token", "secret") # remove the same account removeAccount("user") ## End(Not run)
Set a property on currently deployed ShinyApps application.
setProperty( propertyName, propertyValue, appPath = getwd(), appName = NULL, account = NULL, server = NULL, force = FALSE )
setProperty( propertyName, propertyValue, appPath = getwd(), appName = NULL, account = NULL, server = NULL, force = FALSE )
propertyName |
Name of property |
propertyValue |
Property value |
appPath |
Directory or file that was deployed. Defaults to current working directory. |
appName |
Name of application |
account , server
|
Uniquely identify a remote server with either your
user Use |
force |
Forcibly set the property |
This function only works for ShinyApps servers.
## Not run: # set instance size for an application setProperty("application.instances.count", 1) # disable application package cache setProperty("application.package.cache", FALSE) ## End(Not run)
## Not run: # set instance size for an application setProperty("application.instances.count", 1) # disable application package cache setProperty("application.package.cache", FALSE) ## End(Not run)
List invited users for an application
showInvited(appDir = getwd(), appName = NULL, account = NULL, server = NULL)
showInvited(appDir = getwd(), appName = NULL, account = NULL, server = NULL)
appDir |
Directory containing application. Defaults to current working directory. |
appName |
Name of application. |
account , server
|
Uniquely identify a remote server with either your
user Use |
This function works only for ShinyApps servers.
addAuthorizedUser()
and showUsers()
Show the logs for a deployed ShinyApps application.
showLogs( appPath = getwd(), appFile = NULL, appName = NULL, account = NULL, server = NULL, entries = 50, streaming = FALSE )
showLogs( appPath = getwd(), appFile = NULL, appName = NULL, account = NULL, server = NULL, entries = 50, streaming = FALSE )
appPath |
The path to the directory or file that was deployed. |
appFile |
The path to the R source file that contains the application (for single file applications). |
appName |
The name of the application to show logs for. May be omitted
if only one application deployment was made from |
account |
The account under which the application was deployed. May be omitted if only one account is registered on the system. |
server |
Server name. Required only if you use the same account name on multiple servers. |
entries |
The number of log entries to show. Defaults to 50 entries. |
streaming |
Whether to stream the logs. If |
This function only uses the libcurl
transport, and works only for
ShinyApps servers.
Show application metrics of a currently deployed application. This function only works for ShinyApps servers.
showMetrics( metricSeries, metricNames, appDir = getwd(), appName = NULL, account = NULL, server = "shinyapps.io", from = NULL, until = NULL, interval = NULL )
showMetrics( metricSeries, metricNames, appDir = getwd(), appName = NULL, account = NULL, server = "shinyapps.io", from = NULL, until = NULL, interval = NULL )
metricSeries |
Metric series to query. Refer to the shinyapps.io documentation for available series. |
metricNames |
Metric names in the series to query. Refer to the shinyapps.io documentation for available metrics. |
appDir |
A directory containing an application (e.g. a Shiny app or plumber API). Defaults to the current directory. |
appName |
Application name, a string consisting of letters, numbers,
If not specified, the first deployment will be automatically it from the
|
account , server
|
Uniquely identify a remote server with either your
user Use |
from |
Date range starting timestamp (Unix timestamp or relative time delta such as "2d" or "3w"). |
until |
Date range ending timestamp (Unix timestamp or relative time delta such as "2d" or "3w"). |
interval |
Summarization interval. Data points at intervals less then this will be grouped. (Relative time delta e.g. "120s" or "1h" or "30d"). |
Show properties of an application deployed to ShinyApps.
showProperties( appPath = getwd(), appName = NULL, account = NULL, server = NULL )
showProperties( appPath = getwd(), appName = NULL, account = NULL, server = NULL )
appPath |
Directory or file that was deployed. Defaults to current working directory. |
appName |
Name of application |
account , server
|
Uniquely identify a remote server with either your
user Use |
This function works only for ShinyApps servers.
Show application usage of a currently deployed application
showUsage( appDir = getwd(), appName = NULL, account = NULL, server = NULL, usageType = "hours", from = NULL, until = NULL, interval = NULL )
showUsage( appDir = getwd(), appName = NULL, account = NULL, server = NULL, usageType = "hours", from = NULL, until = NULL, interval = NULL )
appDir |
Directory containing application. Defaults to current working directory. |
appName |
Name of application |
account , server
|
Uniquely identify a remote server with either your
user Use |
usageType |
Use metric to retreive (for example: "hours") |
from |
Date range starting timestamp (Unix timestamp or relative time delta such as "2d" or "3w"). |
until |
Date range ending timestamp (Unix timestamp or relative time delta such as "2d" or "3w"). |
interval |
Summarization interval. Data points at intervals less then this will be grouped. (Relative time delta e.g. "120s" or "1h" or "30d"). |
This function only works for ShinyApps servers.
List authorized users for an application
showUsers(appDir = getwd(), appName = NULL, account = NULL, server = NULL)
showUsers(appDir = getwd(), appName = NULL, account = NULL, server = NULL)
appDir |
Directory containing application. Defaults to current working directory. |
appName |
Name of application. |
account , server
|
Uniquely identify a remote server with either your
user Use |
This function works only for ShinyApps servers.
addAuthorizedUser()
and showInvited()
Update the deployment records for applications published to Posit Connect. This updates application title and URL, and deletes records for deployments where the application has been deleted on the server.
syncAppMetadata(appPath = ".")
syncAppMetadata(appPath = ".")
appPath |
The path to the directory or file that was deployed. |
Writes the task log for the given task
taskLog(taskId, account = NULL, server = NULL, output = NULL)
taskLog(taskId, account = NULL, server = NULL, output = NULL)
taskId |
Task Id |
account , server
|
Uniquely identify a remote server with either your
user Use |
output |
Where to write output. Valid values are |
This function works only with shinyapps.io and posit.cloud.
## Not run: # write task log to stdout taskLog(12345) # write task log to stderr taskLog(12345, output="stderr") ## End(Not run)
## Not run: # write task log to stdout taskLog(12345) # write task log to stderr taskLog(12345, output="stderr") ## End(Not run)
List Tasks
tasks(account = NULL, server = NULL)
tasks(account = NULL, server = NULL)
account , server
|
Uniquely identify a remote server with either your
user Use |
Returns a data frame with the following columns:
id |
Task id |
action |
Task action |
status |
Current task status |
created_time |
Task creation time |
finished_time |
Task finished time |
This function works only with shinyapps.io and posit.cloud.
## Not run: # list tasks for the default account tasks() ## End(Not run)
## Not run: # list tasks for the default account tasks() ## End(Not run)
Terminate and archive a currently deployed ShinyApps application.
terminateApp(appName, account = NULL, server = NULL, quiet = FALSE)
terminateApp(appName, account = NULL, server = NULL, quiet = FALSE)
appName |
Name of application to terminate |
account |
Account name. If a single account is registered on the system then this parameter can be omitted. |
server |
Server name. Required only if you use the same account name on
multiple servers (see |
quiet |
Request that no status information be printed to the console during the termination. |
This function only works for ShinyApps servers.
applications()
, deployApp()
, and
restartApp()
## Not run: # terminate an application terminateApp("myapp") ## End(Not run)
## Not run: # terminate an application terminateApp("myapp") ## End(Not run)
Unset a property on currently deployed ShinyApps application (restoring to its default value)
unsetProperty( propertyName, appPath = getwd(), appName = NULL, account = NULL, server = NULL, force = FALSE )
unsetProperty( propertyName, appPath = getwd(), appName = NULL, account = NULL, server = NULL, force = FALSE )
propertyName |
Name of property |
appPath |
Directory or file that was deployed. Defaults to current working directory. |
appName |
Name of application |
account , server
|
Uniquely identify a remote server with either your
user Use |
force |
Forcibly unset the property |
This function only works for ShinyApps servers.
## Not run: # unset application package cache property to revert to default unsetProperty("application.package.cache") ## End(Not run)
## Not run: # unset application package cache property to revert to default unsetProperty("application.package.cache") ## End(Not run)
manifest.json
Use writeManifest()
to generate a manifest.json
. Among other things,
you can commit this file to git to activate
Git-Backed content
for Posit Connect.
manifest.json
contains a list of all files in the app along with their
dependencies, so you will need to re-run writeManifest()
when either of
these change.
writeManifest( appDir = getwd(), appFiles = NULL, appFileManifest = NULL, appPrimaryDoc = NULL, appMode = NULL, contentCategory = NULL, python = NULL, forceGeneratePythonEnvironment = FALSE, quarto = NA, image = NULL, envManagement = NULL, envManagementR = NULL, envManagementPy = NULL, verbose = FALSE, quiet = FALSE )
writeManifest( appDir = getwd(), appFiles = NULL, appFileManifest = NULL, appPrimaryDoc = NULL, appMode = NULL, contentCategory = NULL, python = NULL, forceGeneratePythonEnvironment = FALSE, quarto = NA, image = NULL, envManagement = NULL, envManagementR = NULL, envManagementPy = NULL, verbose = FALSE, quiet = FALSE )
appDir |
A directory containing an application (e.g. a Shiny app or plumber API). Defaults to the current directory. |
appFiles , appFileManifest
|
Use |
appPrimaryDoc |
If the application contains more than one document, this
parameter indicates the primary one, as a path relative to |
appMode |
Optional; the type of content being deployed.
Provide this option when the inferred type of content is incorrect. This
can happen, for example, when static HTML content includes a downloadable
Shiny application |
contentCategory |
Set this to |
python |
Full path to a python binary for use by |
forceGeneratePythonEnvironment |
Optional. If an existing
|
quarto |
Should the deployed content be built by quarto?
( (This option is ignored and quarto will always be used if the
|
image |
Optional. The name of the image to use when building and
executing this content. If none is provided, Posit Connect will
attempt to choose an image based on the content requirements. You can
override the default by setting the environment variable |
envManagement |
Optional. Should Posit Connect install R and Python
packages for this content? ( (This option is a shorthand flag which overwrites the values of both
|
envManagementR |
Optional. Should Posit Connect install R packages
for this content? ( (This option is ignored when |
envManagementPy |
Optional. Should Posit Connect install Python packages
for this content? ( (This option is ignored when |
verbose |
If |
quiet |
If |