Deno on Cloud Run

Deno + Cloud Run

Create a Deno App

Install Deno

curl -fsSL https://deno.land/x/install/install.sh | sh

Create a main.ts file

main.ts

Run Locally

deno run --allow-env --allow-net main.ts

Create a Dockerfile

Dockerfile
docker build -t app . && docker run -it --init -p 8080:8080 app

Deploy to Cloud Run

GCP_PROJECT=$(gcloud config list --format 'value(core.project)' 2>/dev/null)
gcloud builds submit --tag gcr.io/$GCP_PROJECT/hellodeno
gcloud run deploy hellodeno --image gcr.io/$GCP_PROJECT/hellodeno --platform managed --allow-unauthenticated
https://deno-ff-q7vieseilq-ue.a.run.app

Next Steps

--

--

A collection of technical articles and blogs published or curated by Google Cloud Developer Advocates. The views expressed are those of the authors and don't necessarily reflect those of Google.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store