Deploys an existing gcr.io image.
cr_run(
image,
name = basename(image),
allowUnauthenticated = TRUE,
concurrency = 1,
port = NULL,
max_instances = "default",
memory = "256Mi",
cpu = 1,
timeout = 600L,
region = cr_region_get(),
projectId = cr_project_get(),
launch_browser = interactive(),
env_vars = NULL,
gcloud_args = NULL,
...
)
The name of the image to create or use in deployment - gcr.io
Name for deployment on Cloud Run
TRUE if can be reached from public HTTP address. If FALSE will configure a service-email called (name)-cloudrun-invoker@(project-id).iam.gserviceaccount.com
How many connections each container instance can serve. Can be up to 80.
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".
the desired maximum nuimber of container instances. "default" is 1000, you can get more if you requested a quota instance. For Shiny instances on Cloud Run, this needs to be 1.
The format for size is a fixed or floating point number followed by a unit: G, M, or K corresponding to gigabyte, megabyte, or kilobyte, respectively, or use the power-of-two equivalents: Gi, Mi, Ki corresponding to gibibyte, mebibyte or kibibyte respectively. The default is 256Mi
1 or 2 CPUs for your instance
Amount of time that this build should be allowed to run, to second
The endpoint region for deployment
The GCP project from which the services should be listed
Whether to launch the logs URL in a browser once deployed
Environment arguments passed to the Cloud Run container at runtime. Distinct from env
that run at build time.
a character string of arguments that can be sent to the gcloud command not covered by other parameters of this function
Arguments passed on to cr_buildstep_run
Uses Cloud Build to deploy an image to Cloud Run
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_jwt_create()
,
cr_plumber_pubsub()
,
cr_run_email()
,
cr_run_get()
,
cr_run_list()
,
cr_run_schedule_http()
if (FALSE) {
cr_project_set("my-project")
cr_region_set("europe-west1")
cr_run("gcr.io/my-project/my-image")
cr_run("gcr.io/cloud-tagging-10302018/gtm-cloud-image:stable",
env_vars = c("CONTAINER_CONFIG=xxxxxxx")
)
}