Skip to contents

Deploys a _server.yml-based application from your local machine to make it available on the remote server.

Usage

do_deploy_server(
  droplet,
  path,
  local_path,
  port,
  forward = FALSE,
  overwrite = FALSE,
  ...,
  keyfile = do_keyfile(),
  r_packages = NULL
)

Arguments

droplet

The droplet on which to act. It's expected that this droplet was provisioned using do_provision(). See analogsea::droplet() to obtain a reference to a running droplet.

path

The remote path/name of the application

local_path

The local directory path containing the _server.yml file. The entire directory will be deployed.

port

The internal port on which this service should run. This will not be visible to visitors, but must be unique and point to a port that is available on your server. If unsure, try a number around 8000.

forward

If TRUE, will setup requests targeting the root URL on the server to point to this application. See the do_forward() function for more details.

overwrite

if an application is already running for this path name, and overwrite = TRUE, then do_remove_server will be run.

...

additional arguments to pass to analogsea::droplet_ssh() or analogsea::droplet_upload(). Cannot contain remote, local, keyfile as named arguments.

keyfile

Path to private key for authentication. By default, uses the key for "digitalocean.com" from ssh::ssh_key_info().

r_packages

A character vector of R packages to install via {pak} on the server. When NULL (default), all dependencies found via {renv} will be installed.

Value

The DigitalOcean droplet