Deploys an existing gcr.io image.

cr_run(
  image,
  name = basename(image),
  allowUnauthenticated = TRUE,
  concurrency = 1,
  port = NULL,
  timeout = 600L,
  region = cr_region_get(),
  projectId = cr_project_get(),
  launch_browser = interactive(),
  ...
)

Arguments

image

The name of the image to create or use in deployment - gcr.io

name

Name for deployment on Cloud Run

allowUnauthenticated

TRUE if can be reached from public HTTP address.

concurrency

How many connections each image can serve. Can be up to 80.

port

Container port to receive requests at. Also sets the $PORT environment variable. Must be a number between 1 and 65535, inclusive. To unset this field, pass the special value "default".

timeout

Amount of time that this build should be allowed to run, to second

region

The endpoint region for deployment

projectId

The GCP project from which the services should be listed

launch_browser

Whether to launch the logs URL in a browser once deployed

...

Arguments passed on to cr_buildstep_run

Details

Uses Cloud Build to deploy an image to Cloud Run

See also

Google Documentation for Cloud Run

Use cr_deploy_docker or similar to create image, cr_deploy_run to automate building and deploying, cr_deploy_plumber to deploy plumber APIs.

Deploying Cloud Run using Cloud Build

Other Cloud Run functions: cr_plumber_pubsub(), cr_run_get(), cr_run_list()

Examples

if (FALSE) { cr_project_set("my-project") cr_region_set("europe-west1") cr_run("gcr.io/my-project/my-image") }