Skip to content

Instantly share code, notes, and snippets.

@grant
Created July 26, 2020 23:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save grant/8d41b4fa7e267ed8cc5fac902d9f9088 to your computer and use it in GitHub Desktop.
Save grant/8d41b4fa7e267ed8cc5fac902d9f9088 to your computer and use it in GitHub Desktop.
R Functions Framework Deploy
# Set env var "GCP_PROJECT" to our project name
GCP_PROJECT=$(gcloud config list --format 'value(core.project)' 2>/dev/null)
# Build and upload your image in Google Container Registry
gcloud builds submit \
--tag gcr.io/$GCP_PROJECT/hellor \
--timeout="20m"
# Deploy your container to Cloud Run
gcloud run deploy hellor \
--image gcr.io/$GCP_PROJECT/hellor \
--platform managed \
--allow-unauthenticated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment