From 935c0d4a499b8592eace8804c82feb7a57f15287 Mon Sep 17 00:00:00 2001 From: Pradumna Saraf Date: Fri, 24 Jan 2025 16:36:53 +0530 Subject: [PATCH 01/12] docs: add Deno getting started guide with containerization and deployment instructions --- content/guides/deno/_index.md | 34 ++++++ content/guides/deno/configure-ci-cd.md | 131 ++++++++++++++++++++++ content/guides/deno/containerize.md | 146 +++++++++++++++++++++++++ content/guides/deno/deploy.md | 141 ++++++++++++++++++++++++ content/guides/deno/develop.md | 75 +++++++++++++ 5 files changed, 527 insertions(+) create mode 100644 content/guides/deno/_index.md create mode 100644 content/guides/deno/configure-ci-cd.md create mode 100644 content/guides/deno/containerize.md create mode 100644 content/guides/deno/deploy.md create mode 100644 content/guides/deno/develop.md diff --git a/content/guides/deno/_index.md b/content/guides/deno/_index.md new file mode 100644 index 0000000000..a864479ed9 --- /dev/null +++ b/content/guides/deno/_index.md @@ -0,0 +1,34 @@ +--- +description: Containerize and develop Deno applications using Docker. +keywords: getting started, deno +title: Deno language-specific guide +summary: | + Learn how to containerize JavaScript applications with the Deno runtime using Docker. +linkTitle: Deno +languages: [js] +params: + time: 10 minutes +--- + +The Deno getting started guide teaches you how to create a containerized Deno application using Docker. In this guide, you'll learn how to: + +> **Acknowledgment** +> +> Docker would like to thank [Pradumna Saraf](https://twitter.com/pradumna_saraf) for his contribution to this guide. + +## What will you learn? + +* Containerize and run a Deno application using Docker +* Set up a local environment to develop a Deno application using containers +* Use Docker Compose to run the application. +* Configure a CI/CD pipeline for a containerized Deno application using GitHub Actions +* Deploy your containerized application locally to Kubernetes to test and debug your deployment + +## Prerequisites + +- Basic understanding of JavaScript is assumed. +- You must have familiarity with Docker concepts like containers, images, and Dockerfiles. If you are new to Docker, you can start with the [Docker basics](/get-started/docker-concepts/the-basics/what-is-a-container.md) guide. + +After completing the Deno getting started modules, you should be able to containerize your own Deno application based on the examples and instructions provided in this guide. + +Start by containerizing an existing Deno application. diff --git a/content/guides/deno/configure-ci-cd.md b/content/guides/deno/configure-ci-cd.md new file mode 100644 index 0000000000..5add69d104 --- /dev/null +++ b/content/guides/deno/configure-ci-cd.md @@ -0,0 +1,131 @@ +--- +title: Configure CI/CD for your Deno application +linkTitle: Configure CI/CD +weight: 40 +keywords: ci/cd, github actions, deno, shiny +description: Learn how to configure CI/CD using GitHub Actions for your Deno application. +aliases: +- /language/deno/configure-ci-cd/ +--- + +## Prerequisites + +Complete all the previous sections of this guide, starting with [Containerize a Deno application](containerize.md). You must have a [GitHub](https://github.com/signup) account and a [Docker](https://hub.docker.com/signup) account to complete this section. + +## Overview + +In this section, you'll learn how to set up and use GitHub Actions to build and test your Docker image as well as push it to Docker Hub. You will complete the following steps: + +1. Create a new repository on GitHub. +2. Define the GitHub Actions workflow. +3. Run the workflow. + +## Step one: Create the repository + +Create a GitHub repository, configure the Docker Hub credentials, and push your source code. + +1. [Create a new repository](https://github.com/new) on GitHub. + +2. Open the repository **Settings**, and go to **Secrets and variables** > + **Actions**. + +3. Create a new **Repository variable** named `DOCKER_USERNAME` and your Docker ID as value. + +4. Create a new [Personal Access Token (PAT)](/manuals/security/for-developers/access-tokens.md#create-an-access-token)for Docker Hub. You can name this token `docker-tutorial`. Make sure access permissions include Read and Write. + +5. Add the PAT as a **Repository secret** in your GitHub repository, with the name + `DOCKERHUB_TOKEN`. + +6. In your local repository on your machine, run the following command to change + the origin to the repository you just created. Make sure you change + `your-username` to your GitHub username and `your-repository` to the name of + the repository you created. + + ```console + $ git remote set-url origin https://github.com/your-username/your-repository.git + ``` + +7. Run the following commands to stage, commit, and push your local repository to GitHub. + + ```console + $ git add -A + $ git commit -m "my commit" + $ git push -u origin main + ``` + +## Step two: Set up the workflow + +Set up your GitHub Actions workflow for building, testing, and pushing the image +to Docker Hub. + +1. Go to your repository on GitHub and then select the **Actions** tab. + +2. Select **set up a workflow yourself**. + + This takes you to a page for creating a new GitHub actions workflow file in + your repository, under `.github/workflows/main.yml` by default. + +3. In the editor window, copy and paste the following YAML configuration and commit the changes. + + ```yaml + name: ci + + on: + push: + branches: + - main + + jobs: + build: + runs-on: ubuntu-latest + steps: + - + name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ vars.DOCKER_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - + name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - + name: Build and push + uses: docker/build-push-action@v6 + with: + platforms: linux/amd64,linux/arm64 + push: true + tags: ${{ vars.DOCKER_USERNAME }}/${{ github.event.repository.name }}:latest + ``` + + For more information about the YAML syntax for `docker/build-push-action`, + refer to the [GitHub Action README](https://github.com/docker/build-push-action/blob/master/README.md). + +## Step three: Run the workflow + +Save the workflow file and run the job. + +1. Select **Commit changes...** and push the changes to the `main` branch. + + After pushing the commit, the workflow starts automatically. + +2. Go to the **Actions** tab. It displays the workflow. + + Selecting the workflow shows you the breakdown of all the steps. + +3. When the workflow is complete, go to your + [repositories on Docker Hub](https://hub.docker.com/repositories). + + If you see the new repository in that list, it means the GitHub Actions + successfully pushed the image to Docker Hub. + +## Summary + +In this section, you learned how to set up a GitHub Actions workflow for your Deno application. + +Related information: + - [Introduction to GitHub Actions](/manuals/build/ci/github-actions/_index.md) + - [Workflow syntax for GitHub Actions](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions) + +## Next steps + +Next, learn how you can locally test and debug your workloads on Kubernetes before deploying. diff --git a/content/guides/deno/containerize.md b/content/guides/deno/containerize.md new file mode 100644 index 0000000000..448f4ce136 --- /dev/null +++ b/content/guides/deno/containerize.md @@ -0,0 +1,146 @@ +--- +title: Containerize a Deno application +linkTitle: Containerize your app +weight: 10 +keywords: deno, containerize, initialize +description: Learn how to containerize a Deno application. +aliases: + - /language/deno/containerize/ +--- + +## Prerequisites + +* You have a [Git client](https://git-scm.com/downloads). The examples in this section use a command-line based Git client, but you can use any client. + +## Overview + +For a long time, Node.js has been the go-to runtime for server-side JavaScript applications. However, recent years have introduced new alternative runtimes, including [Deno](https://deno.land/). Like Node.js, Deno is a JavaScript and TypeScript runtime, but it takes a fresh approach with modern security features, a built-in standard library, and native support for TypeScript. + +Why develop Deno applications with Docker? Having a choice of runtimes is exciting, but managing multiple runtimes and their dependencies consistently across environments can be tricky. This is where Docker proves invaluable. Using containers to create and destroy environments on demand simplifies runtime management and ensures consistency. Additionally, as Deno continues to grow and evolve, Docker helps establish a reliable and reproducible development environment, minimizing setup challenges and streamlining the workflow. + +## Get the sample application + +Clone the sample application to use with this guide. Open a terminal, change +directory to a directory that you want to work in, and run the following +command to clone the repository: + +```console +$ git clone https://github.com/Pradumnasaraf/deno-docker.git +``` + +You should now have the following contents in your `deno-docker` directory. + +```text +├── deno-docker/ +│ ├── compose.yml +│ ├── Dockerfile +│ ├── LICENSE +│ ├── server.ts +│ └── README.md +``` + +## Understand the sample application + +The sample application is a simple Deno application that uses the Oak framework to create a simple API that returns a JSON response. The application listens on port 8000 and returns a message `{"Status" : "OK"}` when you access the application in a browser. + +```typescript +// server.ts +import { Application, Router } from "https://deno.land/x/oak@v12.0.0/mod.ts"; + +const app = new Application(); +const router = new Router(); + +// Define a route that returns JSON +router.get("/", (context) => { + context.response.body = { Status: "OK" }; + context.response.type = "application/json"; +}); + +app.use(router.routes()); +app.use(router.allowedMethods()); + +console.log("Server running on http://localhost:8000"); +await app.listen({ port: 8000 }); +``` + +## Create a Dockerfile + +In the Dockerfile, you'll notice that the `FROM` instruction uses `denoland/deno:latest` +as the base image. This is the official image for Deno. This image is [available on the Docker Hub](https://hub.docker.com/r/denoland/deno). + +```dockerfile +# Use the official Deno image +FROM denoland/deno:latest + +# Set the working directory +WORKDIR /app + +# Copy server code into the container +COPY server.ts . + +# Set permissions (optional but recommended for security) +USER deno + +# Expose port 8000 +EXPOSE 8000 + +# Run the Deno server +CMD ["run", "--allow-net", "server.ts"] +``` + +Aside from specifying `denoland/deno:latest` as the base image, the Dockerfile + +- Sets the working directory in the container to `/app` +- Copies `server.ts` into the container. +- Sets the user to `deno` to run the application as a non-root user. +- Exposes port 8000 to allow traffic to the application. +- Runs the Deno server using the `CMD` instruction. +- The `--allow-net` flag is used to allow network access to the application. The `server.ts` file uses the Oak framework to create a simple API that listens on port 8000. + +## Run the application + +Make sure you are in the `deno-docker` directory. Run the following command in a terminal to build and run the application. + +```console +$ docker compose up --build +``` + +Open a browser and view the application at [http://localhost:8000](http://localhost:8000). You will see a message `{"Status" : "OK"}` in the browser. + +In the terminal, press `ctrl`+`c` to stop the application. + +### Run the application in the background + +You can run the application detached from the terminal by adding the `-d` +option. Inside the `deno-docker` directory, run the following command +in a terminal. + +```console +$ docker compose up --build -d +``` + +Open a browser and view the application at [http://localhost:8000](http://localhost:8000). + + +In the terminal, run the following command to stop the application. + +```console +$ docker compose down +``` + +## Summary + +In this section, you learned how you can containerize and run your Deno +application using Docker. + +Related information: + + - [Dockerfile reference](/reference/dockerfile.md) + - [.dockerignore file](/reference/dockerfile.md#dockerignore-file) + - [Docker Compose overview](/manuals/compose/_index.md) + - [Compose file reference](/reference/compose-file/_index.md) + +## Next steps + +In the next section, you'll learn how you can develop your application using +containers. diff --git a/content/guides/deno/deploy.md b/content/guides/deno/deploy.md new file mode 100644 index 0000000000..28727c5d4f --- /dev/null +++ b/content/guides/deno/deploy.md @@ -0,0 +1,141 @@ +--- +title: Test your Deno deployment +linkTitle: Test your deployment +weight: 50 +keywords: deploy, kubernetes, deno +description: Learn how to develop locally using Kubernetes +aliases: +- /language/deno/deploy/ +--- + +## Prerequisites + +- Complete all the previous sections of this guide, starting with [Containerize a Deno application](containerize.md). +- [Turn on Kubernetes](/manuals//desktop/features/kubernetes.md#install-and-turn-on-kubernetes) in Docker Desktop. + +## Overview + +In this section, you'll learn how to use Docker Desktop to deploy your application to a fully-featured Kubernetes environment on your development machine. This allows you to test and debug your workloads on Kubernetes locally before deploying. + +## Create a Kubernetes YAML file + +In your `deno-docker` directory, create a file named +`docker-kubernetes.yml`. Open the file in an IDE or text editor and add +the following contents. Replace `DOCKER_USERNAME/REPO_NAME` with your Docker +username and the name of the repository that you created in [Configure CI/CD for +your Deno application](configure-ci-cd.md). + +```yaml +apiVersion: apps/v1 +kind: Deployment +metadata: + name: docker-deno-demo + namespace: default +spec: + replicas: 1 + selector: + matchLabels: + app: deno-api + template: + metadata: + labels: + app: deno-api + spec: + containers: + - name: deno-api + image: DOCKER_USERNAME/REPO_NAME + imagePullPolicy: Always +--- +apiVersion: v1 +kind: Service +metadata: + name: service-entrypoint + namespace: default +spec: + type: NodePort + selector: + app: deno-api + ports: + - port: 3000 + targetPort: 3000 + nodePort: 30001 +``` + +In this Kubernetes YAML file, there are two objects, separated by the `---`: + + - A Deployment, describing a scalable group of identical pods. In this case, + you'll get just one replica, or copy of your pod. That pod, which is + described under `template`, has just one container in it. The + container is created from the image built by GitHub Actions in [Configure CI/CD for + your Deno application](configure-ci-cd.md). + - A NodePort service, which will route traffic from port 30001 on your host to + port 3000 inside the pods it routes to, allowing you to reach your app + from the network. + +To learn more about Kubernetes objects, see the [Kubernetes documentation](https://kubernetes.io/docs/home/). + +## Deploy and check your application + +1. In a terminal, navigate to `deno-docker` and deploy your application to + Kubernetes. + + ```console + $ kubectl apply -f docker-kubernetes.yml + ``` + + You should see output that looks like the following, indicating your Kubernetes objects were created successfully. + + ```text + deployment.apps/docker-deno-demo created + service/service-entrypoint created + ``` + +2. Make sure everything worked by listing your deployments. + + ```console + $ kubectl get deployments + ``` + + Your deployment should be listed as follows: + + ```shell + NAME READY UP-TO-DATE AVAILABLE AGE + docker-deno-demo 1/1 1 1 10s + ``` + + This indicates all one of the pods you asked for in your YAML are up and running. Do the same check for your services. + + ```console + $ kubectl get services + ``` + + You should get output like the following. + + ```shell + NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE + kubernetes ClusterIP 10.96.0.1 443/TCP 88m + service-entrypoint NodePort 10.105.145.223 3000:30001/TCP 83s + ``` + + In addition to the default `kubernetes` service, you can see your `service-entrypoint` service, accepting traffic on port 30001/TCP. + +3. In a browser, visit the following address. You should see the message `{"Status" : "OK"}`. + + ```console + http://localhost:30001/ + ``` + +4. Run the following command to tear down your application. + + ```console + $ kubectl delete -f docker-kubernetes.yml + ``` + +## Summary + +In this section, you learned how to use Docker Desktop to deploy your Deno application to a fully-featured Kubernetes environment on your development machine. + +Related information: + - [Kubernetes documentation](https://kubernetes.io/docs/home/) + - [Deploy on Kubernetes with Docker Desktop](/manuals/desktop/features/kubernetes.md) + - [Swarm mode overview](/manuals/engine/swarm/_index.md) diff --git a/content/guides/deno/develop.md b/content/guides/deno/develop.md new file mode 100644 index 0000000000..64ddb47d3b --- /dev/null +++ b/content/guides/deno/develop.md @@ -0,0 +1,75 @@ +--- +title: Use containers for Deno development +linkTitle: Develop your app +weight: 20 +keywords: deno, local, development +description: Learn how to develop your Deno application locally. +aliases: +- /language/deno/develop/ +--- + +## Prerequisites + +Complete [Containerize a Deno application](containerize.md). + +## Overview + +In this section, you'll learn how to set up a development environment for your containerized application. This includes: + +- Configuring Compose to automatically update your running Compose services as you edit and save your code + +## Get the sample application + +Clone the sample application to use with this guide. Open a terminal, change directory to a directory that you want to work in, and run the following command to clone the repository: + +```console +$ git clone https://github.com/Pradumnasaraf/deno-docker.git +``` + +## Automatically update services + +Use Compose Watch to automatically update your running Compose services as you +edit and save your code. For more details about Compose Watch, see [Use Compose +Watch](/manuals/compose/how-tos/file-watch.md). + +Open your `compose.yml` file in an IDE or text editor and then add the Compose Watch instructions. The following example shows how to add Compose Watch to your `compose.yml` file. + +```yaml {hl_lines="9-12",linenos=true} +services: + server: + image: deno-server + build: + context: . + dockerfile: Dockerfile + ports: + - "8000:8000" + develop: + watch: + - action: rebuild + path: . +``` + +Run the following command to run your application with Compose Watch. + +```console +$ docker compose watch +``` + +Now, if you modify your `server.ts` you will see the changes in real time without re-building the image. + +To test it out, open the `server.ts` file in your favorite text editor and change the message from `{"Status" : "OK"}` to `{"Status" : "Updated"}`. Save the file and refresh your browser at `http://localhost:8000`. You should see the updated message. + +Press `ctrl+c` in the terminal to stop your application. + +## Summary + +In this section, you also learned how to use Compose Watch to automatically rebuild and run your container when you update your code. + +Related information: + - [Compose file reference](/reference/compose-file/) + - [Compose file watch](/manuals/compose/how-tos/file-watch.md) + - [Multi-stage builds](/manuals/build/building/multi-stage.md) + +## Next steps + +In the next section, you'll take a look at how to set up a CI/CD pipeline using GitHub Actions. From 9e5c09a5a1f2970aec66b66da02ee0afca296133 Mon Sep 17 00:00:00 2001 From: Pradumna Saraf Date: Fri, 24 Jan 2025 16:41:30 +0530 Subject: [PATCH 02/12] fix: update repository URL in Deno guides to point to the correct source --- content/guides/deno/containerize.md | 2 +- content/guides/deno/develop.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/content/guides/deno/containerize.md b/content/guides/deno/containerize.md index 448f4ce136..2a2eb3d9e5 100644 --- a/content/guides/deno/containerize.md +++ b/content/guides/deno/containerize.md @@ -25,7 +25,7 @@ directory to a directory that you want to work in, and run the following command to clone the repository: ```console -$ git clone https://github.com/Pradumnasaraf/deno-docker.git +$ git clone https://github.com/dockersamples/deno-docker.git ``` You should now have the following contents in your `deno-docker` directory. diff --git a/content/guides/deno/develop.md b/content/guides/deno/develop.md index 64ddb47d3b..49f11139d6 100644 --- a/content/guides/deno/develop.md +++ b/content/guides/deno/develop.md @@ -23,7 +23,7 @@ In this section, you'll learn how to set up a development environment for your c Clone the sample application to use with this guide. Open a terminal, change directory to a directory that you want to work in, and run the following command to clone the repository: ```console -$ git clone https://github.com/Pradumnasaraf/deno-docker.git +$ git clone https://github.com/dockersamples/deno-docker.git ``` ## Automatically update services From aee0079f9746760ec32b1cf622b2f5fc13a0402a Mon Sep 17 00:00:00 2001 From: Pradumna Saraf Date: Wed, 12 Feb 2025 20:31:43 +0530 Subject: [PATCH 03/12] Update content/guides/deno/containerize.md Co-authored-by: Craig Osterhout <103533812+craig-osterhout@users.noreply.github.com> --- content/guides/deno/containerize.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/guides/deno/containerize.md b/content/guides/deno/containerize.md index 2a2eb3d9e5..beaff49817 100644 --- a/content/guides/deno/containerize.md +++ b/content/guides/deno/containerize.md @@ -88,7 +88,7 @@ EXPOSE 8000 CMD ["run", "--allow-net", "server.ts"] ``` -Aside from specifying `denoland/deno:latest` as the base image, the Dockerfile +Aside from specifying `denoland/deno:latest` as the base image, the Dockerfile: - Sets the working directory in the container to `/app` - Copies `server.ts` into the container. From 996ff658071e8525462a2bf176bf1f4e63e4567b Mon Sep 17 00:00:00 2001 From: Pradumna Saraf Date: Wed, 12 Feb 2025 20:31:51 +0530 Subject: [PATCH 04/12] Update content/guides/deno/containerize.md Co-authored-by: Craig Osterhout <103533812+craig-osterhout@users.noreply.github.com> --- content/guides/deno/containerize.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/guides/deno/containerize.md b/content/guides/deno/containerize.md index beaff49817..0777ed25a7 100644 --- a/content/guides/deno/containerize.md +++ b/content/guides/deno/containerize.md @@ -90,7 +90,7 @@ CMD ["run", "--allow-net", "server.ts"] Aside from specifying `denoland/deno:latest` as the base image, the Dockerfile: -- Sets the working directory in the container to `/app` +- Sets the working directory in the container to `/app`. - Copies `server.ts` into the container. - Sets the user to `deno` to run the application as a non-root user. - Exposes port 8000 to allow traffic to the application. From 139fce8441c0de14adaa7a32e236c3813d0ae1aa Mon Sep 17 00:00:00 2001 From: Pradumna Saraf Date: Wed, 12 Feb 2025 20:31:56 +0530 Subject: [PATCH 05/12] Update content/guides/deno/configure-ci-cd.md Co-authored-by: Craig Osterhout <103533812+craig-osterhout@users.noreply.github.com> --- content/guides/deno/configure-ci-cd.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/guides/deno/configure-ci-cd.md b/content/guides/deno/configure-ci-cd.md index 5add69d104..a0e7dc0363 100644 --- a/content/guides/deno/configure-ci-cd.md +++ b/content/guides/deno/configure-ci-cd.md @@ -55,7 +55,7 @@ Create a GitHub repository, configure the Docker Hub credentials, and push your ## Step two: Set up the workflow -Set up your GitHub Actions workflow for building, testing, and pushing the image +Set up your GitHub Actions workflow for building and pushing the image to Docker Hub. 1. Go to your repository on GitHub and then select the **Actions** tab. From 223d348ddc7f4044e1f93d0a8d1e2808b52c9c97 Mon Sep 17 00:00:00 2001 From: Pradumna Saraf Date: Wed, 12 Feb 2025 20:32:04 +0530 Subject: [PATCH 06/12] Update content/guides/deno/deploy.md Co-authored-by: Craig Osterhout <103533812+craig-osterhout@users.noreply.github.com> --- content/guides/deno/deploy.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/guides/deno/deploy.md b/content/guides/deno/deploy.md index 28727c5d4f..692faae193 100644 --- a/content/guides/deno/deploy.md +++ b/content/guides/deno/deploy.md @@ -57,7 +57,7 @@ spec: app: deno-api ports: - port: 3000 - targetPort: 3000 + targetPort: 8000 nodePort: 30001 ``` From 74e0931e5bd508db68717bb6771712f4ae5fb4c7 Mon Sep 17 00:00:00 2001 From: Pradumna Saraf Date: Wed, 12 Feb 2025 20:32:11 +0530 Subject: [PATCH 07/12] Update content/guides/deno/deploy.md Co-authored-by: Craig Osterhout <103533812+craig-osterhout@users.noreply.github.com> --- content/guides/deno/deploy.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/guides/deno/deploy.md b/content/guides/deno/deploy.md index 692faae193..a7c7fb5f16 100644 --- a/content/guides/deno/deploy.md +++ b/content/guides/deno/deploy.md @@ -114,7 +114,7 @@ To learn more about Kubernetes objects, see the [Kubernetes documentation](https ```shell NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE kubernetes ClusterIP 10.96.0.1 443/TCP 88m - service-entrypoint NodePort 10.105.145.223 3000:30001/TCP 83s + service-entrypoint NodePort 10.105.145.223 8000:30001/TCP 83s ``` In addition to the default `kubernetes` service, you can see your `service-entrypoint` service, accepting traffic on port 30001/TCP. From 188562628ed8f3dc752f45bc45df5145b5e80514 Mon Sep 17 00:00:00 2001 From: Pradumna Saraf Date: Wed, 12 Feb 2025 20:32:19 +0530 Subject: [PATCH 08/12] Update content/guides/deno/containerize.md Co-authored-by: Craig Osterhout <103533812+craig-osterhout@users.noreply.github.com> --- content/guides/deno/containerize.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/guides/deno/containerize.md b/content/guides/deno/containerize.md index 0777ed25a7..20c627575d 100644 --- a/content/guides/deno/containerize.md +++ b/content/guides/deno/containerize.md @@ -95,7 +95,7 @@ Aside from specifying `denoland/deno:latest` as the base image, the Dockerfile: - Sets the user to `deno` to run the application as a non-root user. - Exposes port 8000 to allow traffic to the application. - Runs the Deno server using the `CMD` instruction. -- The `--allow-net` flag is used to allow network access to the application. The `server.ts` file uses the Oak framework to create a simple API that listens on port 8000. +- Uses the `--allow-net` flag to allow network access to the application. The `server.ts` file uses the Oak framework to create a simple API that listens on port 8000. ## Run the application From 79fd79456416ff62a1a12c44963dc13b22e9fc8f Mon Sep 17 00:00:00 2001 From: Pradumna Saraf Date: Wed, 12 Feb 2025 20:32:30 +0530 Subject: [PATCH 09/12] Update content/guides/deno/deploy.md Co-authored-by: Craig Osterhout <103533812+craig-osterhout@users.noreply.github.com> --- content/guides/deno/deploy.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/guides/deno/deploy.md b/content/guides/deno/deploy.md index a7c7fb5f16..2e1c073d36 100644 --- a/content/guides/deno/deploy.md +++ b/content/guides/deno/deploy.md @@ -69,7 +69,7 @@ In this Kubernetes YAML file, there are two objects, separated by the `---`: container is created from the image built by GitHub Actions in [Configure CI/CD for your Deno application](configure-ci-cd.md). - A NodePort service, which will route traffic from port 30001 on your host to - port 3000 inside the pods it routes to, allowing you to reach your app + port 8000 inside the pods it routes to, allowing you to reach your app from the network. To learn more about Kubernetes objects, see the [Kubernetes documentation](https://kubernetes.io/docs/home/). From 75a7f4e338758f06a9eeeb49b002928fce946618 Mon Sep 17 00:00:00 2001 From: Pradumna Saraf Date: Wed, 12 Feb 2025 20:32:38 +0530 Subject: [PATCH 10/12] Update content/guides/deno/deploy.md Co-authored-by: Craig Osterhout <103533812+craig-osterhout@users.noreply.github.com> --- content/guides/deno/deploy.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/guides/deno/deploy.md b/content/guides/deno/deploy.md index 2e1c073d36..447d7f4a85 100644 --- a/content/guides/deno/deploy.md +++ b/content/guides/deno/deploy.md @@ -56,7 +56,7 @@ spec: selector: app: deno-api ports: - - port: 3000 + - port: 8000 targetPort: 8000 nodePort: 30001 ``` From f7014d35ff15144a2832c09ec18ee3f78a8a1c86 Mon Sep 17 00:00:00 2001 From: Craig Osterhout <103533812+craig-osterhout@users.noreply.github.com> Date: Thu, 13 Feb 2025 10:38:51 -0800 Subject: [PATCH 11/12] Update content/guides/deno/containerize.md --- content/guides/deno/containerize.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/guides/deno/containerize.md b/content/guides/deno/containerize.md index 20c627575d..5c5239bf0a 100644 --- a/content/guides/deno/containerize.md +++ b/content/guides/deno/containerize.md @@ -25,7 +25,7 @@ directory to a directory that you want to work in, and run the following command to clone the repository: ```console -$ git clone https://github.com/dockersamples/deno-docker.git +$ git clone https://github.com/dockersamples/docker-deno.git ``` You should now have the following contents in your `deno-docker` directory. From 62f8262a703e1897ae0d8163eb1ebb6ee2105c0d Mon Sep 17 00:00:00 2001 From: Craig Osterhout <103533812+craig-osterhout@users.noreply.github.com> Date: Thu, 13 Feb 2025 10:38:57 -0800 Subject: [PATCH 12/12] Update content/guides/deno/develop.md --- content/guides/deno/develop.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/guides/deno/develop.md b/content/guides/deno/develop.md index 49f11139d6..f90a2e0304 100644 --- a/content/guides/deno/develop.md +++ b/content/guides/deno/develop.md @@ -23,7 +23,7 @@ In this section, you'll learn how to set up a development environment for your c Clone the sample application to use with this guide. Open a terminal, change directory to a directory that you want to work in, and run the following command to clone the repository: ```console -$ git clone https://github.com/dockersamples/deno-docker.git +$ git clone https://github.com/dockersamples/docker-deno.git ``` ## Automatically update services