Skip to content

Hello world with Deno in Docker, on Google Cloud Run if you like.

License

Notifications You must be signed in to change notification settings

rogiervandenberg/deno-docker-cloudrun

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Deno in Docker (on Cloud Run)

Concrete example of Deno Run on Cloud Run. Could be used as boilerplate for Deno in Docker / on Google Cloud Run.

Run locally

First, make sure you have Deno installed

Then, to locally run, execute:

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

This will build and run the demo.

Run in Docker

To run in docker, first build the app:

docker build -t denotest .

then run the container:

docker run -it --init -p 8080:8080 denotest

The dockerfile will pre-cache all dependencies.

Run on Cloud Run

Because the whole thing runs in Docker, this is easy (make sure you are logged in and have the right project on GCP selected with gcloud):

Set GCP project to your env variable

This is optional, but nice to have:

GCP_PROJECT=$(gcloud config list --format 'value(core.project)')

Submit your code to Google Code Repository

gcloud builds submit --tag gcr.io/$GCP_PROJECT/denotest

Deploy your code on Cloud Run

gcloud run deploy denotest --image gcr.io/$GCP_PROJECT/denotest --platform managed --allow-unauthenticated

One click to deploy to Cloud Run

Run on Google Cloud

About

Hello world with Deno in Docker, on Google Cloud Run if you like.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published