From 49965a489608ff473a5af21ffb8efc4a077d3968 Mon Sep 17 00:00:00 2001 From: Jazli14 <95947726+Jazli14@users.noreply.github.com> Date: Fri, 17 Nov 2023 16:04:07 -0500 Subject: [PATCH 1/9] Create Deploy_Node.js_AWS --- Topics/Development_Process/Deploy_Node.js_AWS | 1 + 1 file changed, 1 insertion(+) create mode 100644 Topics/Development_Process/Deploy_Node.js_AWS diff --git a/Topics/Development_Process/Deploy_Node.js_AWS b/Topics/Development_Process/Deploy_Node.js_AWS new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/Topics/Development_Process/Deploy_Node.js_AWS @@ -0,0 +1 @@ + From 3b24e9dd5ac931c5f6880d640987ac8c2b301d3e Mon Sep 17 00:00:00 2001 From: Jazli14 <95947726+Jazli14@users.noreply.github.com> Date: Fri, 17 Nov 2023 16:05:43 -0500 Subject: [PATCH 2/9] Update and rename Deploy_Node.js_AWS to Deploy_Node.js_AWS.md --- Topics/Development_Process/Deploy_Node.js_AWS | 1 - .../Development_Process/Deploy_Node.js_AWS.md | 18 ++++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) delete mode 100644 Topics/Development_Process/Deploy_Node.js_AWS create mode 100644 Topics/Development_Process/Deploy_Node.js_AWS.md diff --git a/Topics/Development_Process/Deploy_Node.js_AWS b/Topics/Development_Process/Deploy_Node.js_AWS deleted file mode 100644 index 8b1378917..000000000 --- a/Topics/Development_Process/Deploy_Node.js_AWS +++ /dev/null @@ -1 +0,0 @@ - diff --git a/Topics/Development_Process/Deploy_Node.js_AWS.md b/Topics/Development_Process/Deploy_Node.js_AWS.md new file mode 100644 index 000000000..c568eb834 --- /dev/null +++ b/Topics/Development_Process/Deploy_Node.js_AWS.md @@ -0,0 +1,18 @@ +# Node.js Deployment through Docker and AWS + +## Table of Contents +### [Tech Stack Overview](#tech-stack-overview-1) + +In the realm of modern software development, containerization has become a standard practice for deploying applications. Docker simplifies this process by packaging applications and their dependencies into containers, ensuring consistency across various environments. Node.js, a popular JavaScript runtime, is often used to build scalable and efficient server-side applications. + +AWS (Amazon Web Services) provides a suite of cloud services that enable developers to deploy and manage applications easily. ECS (Elastic Container Service) and ECR (Elastic Container Registry) are two fundamental services offered by AWS to manage containers and container images, respectively. + +## Tech Stack Overview + +Docker: Docker is a platform that allows you to package an application and its dependencies into a standardized unit called a container. It provides isolation, portability, and scalability for applications. It allows for easy deployment as it essentially creates a separate virtual machine to run the application on. + +Node.js: Node.js is a JavaScript runtime environment which is built on Chrome's V8 JavaScript engine. It enables developers to run JavaScript code on the server-side, making it ideal for building scalable network applications. + +AWS ECS (Elastic Container Service): ECS is a fully-managed container orchestration service provided by AWS. It allows you to run, stop, and manage Docker containers on a cluster of EC2 instances easily. + +AWS ECR (Elastic Container Registry): ECR is a managed Docker container registry provided by AWS. It allows you to store, manage, and deploy Docker container images, making it easy to integrate with ECS for container deployments. From 4d2ce9f2d8a6e6daf2f9ab78c6ea45d85427c74a Mon Sep 17 00:00:00 2001 From: Jazli14 <95947726+Jazli14@users.noreply.github.com> Date: Fri, 17 Nov 2023 16:06:53 -0500 Subject: [PATCH 3/9] Update Deploy_Node.js_AWS.md --- Topics/Development_Process/Deploy_Node.js_AWS.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Topics/Development_Process/Deploy_Node.js_AWS.md b/Topics/Development_Process/Deploy_Node.js_AWS.md index c568eb834..5200d8a02 100644 --- a/Topics/Development_Process/Deploy_Node.js_AWS.md +++ b/Topics/Development_Process/Deploy_Node.js_AWS.md @@ -1,13 +1,11 @@ # Node.js Deployment through Docker and AWS -## Table of Contents -### [Tech Stack Overview](#tech-stack-overview-1) - +## Overview In the realm of modern software development, containerization has become a standard practice for deploying applications. Docker simplifies this process by packaging applications and their dependencies into containers, ensuring consistency across various environments. Node.js, a popular JavaScript runtime, is often used to build scalable and efficient server-side applications. AWS (Amazon Web Services) provides a suite of cloud services that enable developers to deploy and manage applications easily. ECS (Elastic Container Service) and ECR (Elastic Container Registry) are two fundamental services offered by AWS to manage containers and container images, respectively. -## Tech Stack Overview +## Tech Stack Docker: Docker is a platform that allows you to package an application and its dependencies into a standardized unit called a container. It provides isolation, portability, and scalability for applications. It allows for easy deployment as it essentially creates a separate virtual machine to run the application on. From 5826268a2c0f2c251c2fd015bee5828771fd2462 Mon Sep 17 00:00:00 2001 From: Jazli14 <95947726+Jazli14@users.noreply.github.com> Date: Fri, 17 Nov 2023 16:07:59 -0500 Subject: [PATCH 4/9] Update Deploy_Node.js_AWS.md --- Topics/Development_Process/Deploy_Node.js_AWS.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Topics/Development_Process/Deploy_Node.js_AWS.md b/Topics/Development_Process/Deploy_Node.js_AWS.md index 5200d8a02..9c02a6059 100644 --- a/Topics/Development_Process/Deploy_Node.js_AWS.md +++ b/Topics/Development_Process/Deploy_Node.js_AWS.md @@ -11,6 +11,9 @@ Docker: Docker is a platform that allows you to package an application and its d Node.js: Node.js is a JavaScript runtime environment which is built on Chrome's V8 JavaScript engine. It enables developers to run JavaScript code on the server-side, making it ideal for building scalable network applications. -AWS ECS (Elastic Container Service): ECS is a fully-managed container orchestration service provided by AWS. It allows you to run, stop, and manage Docker containers on a cluster of EC2 instances easily. +Amazon ECS (Elastic Container Service): ECS is a fully-managed container orchestration service provided by AWS. It allows you to run, stop, and manage Docker containers on a cluster of EC2 instances easily. + +Amazon ECR (Elastic Container Registry): ECR is a managed Docker container registry provided by AWS. It allows you to store, manage, and deploy Docker container images, making it easy to integrate with ECS for container deployments. + +Amazon EC2 (Elastic Compute Cloud): EC2 is AWS's resizable cloud computing service offering virtual machines (instances) for running applications. It provides flexibility to configure and scale computing resources based on demand. -AWS ECR (Elastic Container Registry): ECR is a managed Docker container registry provided by AWS. It allows you to store, manage, and deploy Docker container images, making it easy to integrate with ECS for container deployments. From a055acd259ec28099de5e756e63f3f28c49eecc8 Mon Sep 17 00:00:00 2001 From: Jazli14 <95947726+Jazli14@users.noreply.github.com> Date: Sat, 18 Nov 2023 18:41:47 -0500 Subject: [PATCH 5/9] Update and rename Deploy_Node.js_AWS.md to Deploy_Node.js_Docker_AWS.md --- .../Development_Process/Deploy_Node.js_AWS.md | 19 ----- .../Deploy_Node.js_Docker_AWS.md | 69 +++++++++++++++++++ 2 files changed, 69 insertions(+), 19 deletions(-) delete mode 100644 Topics/Development_Process/Deploy_Node.js_AWS.md create mode 100644 Topics/Development_Process/Deploy_Node.js_Docker_AWS.md diff --git a/Topics/Development_Process/Deploy_Node.js_AWS.md b/Topics/Development_Process/Deploy_Node.js_AWS.md deleted file mode 100644 index 9c02a6059..000000000 --- a/Topics/Development_Process/Deploy_Node.js_AWS.md +++ /dev/null @@ -1,19 +0,0 @@ -# Node.js Deployment through Docker and AWS - -## Overview -In the realm of modern software development, containerization has become a standard practice for deploying applications. Docker simplifies this process by packaging applications and their dependencies into containers, ensuring consistency across various environments. Node.js, a popular JavaScript runtime, is often used to build scalable and efficient server-side applications. - -AWS (Amazon Web Services) provides a suite of cloud services that enable developers to deploy and manage applications easily. ECS (Elastic Container Service) and ECR (Elastic Container Registry) are two fundamental services offered by AWS to manage containers and container images, respectively. - -## Tech Stack - -Docker: Docker is a platform that allows you to package an application and its dependencies into a standardized unit called a container. It provides isolation, portability, and scalability for applications. It allows for easy deployment as it essentially creates a separate virtual machine to run the application on. - -Node.js: Node.js is a JavaScript runtime environment which is built on Chrome's V8 JavaScript engine. It enables developers to run JavaScript code on the server-side, making it ideal for building scalable network applications. - -Amazon ECS (Elastic Container Service): ECS is a fully-managed container orchestration service provided by AWS. It allows you to run, stop, and manage Docker containers on a cluster of EC2 instances easily. - -Amazon ECR (Elastic Container Registry): ECR is a managed Docker container registry provided by AWS. It allows you to store, manage, and deploy Docker container images, making it easy to integrate with ECS for container deployments. - -Amazon EC2 (Elastic Compute Cloud): EC2 is AWS's resizable cloud computing service offering virtual machines (instances) for running applications. It provides flexibility to configure and scale computing resources based on demand. - diff --git a/Topics/Development_Process/Deploy_Node.js_Docker_AWS.md b/Topics/Development_Process/Deploy_Node.js_Docker_AWS.md new file mode 100644 index 000000000..6bd60afc4 --- /dev/null +++ b/Topics/Development_Process/Deploy_Node.js_Docker_AWS.md @@ -0,0 +1,69 @@ +# Node.js Deployment through Docker and AWS + +## Overview +In the realm of modern software development, containerization has become a standard practice for deploying applications. Docker simplifies this process by packaging applications and their dependencies into containers, ensuring consistency across various environments. Node.js, a popular JavaScript runtime, is often used to build scalable and efficient server-side applications. + +AWS (Amazon Web Services) provides a suite of cloud services that enable developers to deploy and manage applications easily. ECS (Elastic Container Service) and ECR (Elastic Container Registry) are two fundamental services offered by AWS to manage containers and container images, respectively. + +## Tech Stack + +Docker: Docker is a platform that allows you to package an application and its dependencies into a standardized unit called a container. It provides isolation, portability, and scalability for applications. It allows for easy deployment as it essentially creates a separate virtual machine to run the application on. + +Node.js: Node.js is a JavaScript runtime environment which is built on Chrome's V8 JavaScript engine. It enables developers to run JavaScript code on the server-side, making it ideal for building scalable network applications. + +Amazon ECS (Elastic Container Service): ECS is a fully-managed container orchestration service provided by AWS. It allows you to run, stop, and manage Docker containers on a cluster of EC2 instances easily. + +Amazon ECR (Elastic Container Registry): ECR is a managed Docker container registry provided by AWS. It allows you to store, manage, and deploy Docker container images, making it easy to integrate with ECS for container deployments. + +Amazon EC2 (Elastic Compute Cloud): EC2 is AWS's resizable cloud computing service offering virtual machines (instances) for running applications. It provides flexibility to configure and scale computing resources based on demand. + +## Deployment Process +### Containerize your Node.js application: +Using Dockerfile allows one to create a container for the app. +Create a Dockerfile in the root directory of your Node.js application. +Write instructions to build your Node.js app within the Dockerfile. +Build the Docker image locally using docker build -t . +Test the image locally to ensure it works as expected: docker run -p 8080:80 +The first number 8080 is the host port and 80 is the container port. + +### Create an ECR repository: + +Log in to the AWS Management Console. +Go to the Amazon ECR service. +Create a new repository to store your Docker image. +Push your Docker image to ECR: +Tag your Docker image with the ECR repository URL: +```bash +$ docker tag .dkr.ecr..amazonaws.com/: +``` +Log in to ECR using the AWS CLI: +```bash +$ aws ecr get-login-password --region | docker login --username AWS --password-stdin .dkr.ecr..amazonaws.com +``` +Push your Docker image to the ECR repository: +```bash +$ docker push .dkr.ecr..amazonaws.com/: +``` + +Replace \ with the name you want to label your image with +Replace \, \, \, \ with your correct credentials and your ECR name URL. + +Create an ECS Task Definition: + +Go to the Amazon ECS service in the AWS Management Console. +Create a new task definition specifying your container image from ECR, CPU, memory requirements, etc. + +Create an ECS Cluster: +Create an ECS cluster if you don't have one already. +Configure the ECS cluster settings and select launch type (Fargate or EC2). + +Create an ECS Service: +Define a service within the ECS cluster. +Specify the task definition, desired number of tasks, network configuration, load balancer settings, etc. + +Deploy your ECS Service: +Review and finalize the ECS service settings. +Deploy the service to the ECS cluster. + +# Access your Node.js application +Once the ECS service is up and running, access your Node.js application using the provided service endpoint. From 9276047892b2f1eab81fd2098d4a258590ec387d Mon Sep 17 00:00:00 2001 From: Jazli14 <95947726+Jazli14@users.noreply.github.com> Date: Tue, 21 Nov 2023 22:04:09 -0500 Subject: [PATCH 6/9] Update Deploy_Node.js_Docker_AWS.md --- .../Deploy_Node.js_Docker_AWS.md | 101 ++++++++++++------ 1 file changed, 69 insertions(+), 32 deletions(-) diff --git a/Topics/Development_Process/Deploy_Node.js_Docker_AWS.md b/Topics/Development_Process/Deploy_Node.js_Docker_AWS.md index 6bd60afc4..be98bf290 100644 --- a/Topics/Development_Process/Deploy_Node.js_Docker_AWS.md +++ b/Topics/Development_Process/Deploy_Node.js_Docker_AWS.md @@ -5,6 +5,8 @@ In the realm of modern software development, containerization has become a stand AWS (Amazon Web Services) provides a suite of cloud services that enable developers to deploy and manage applications easily. ECS (Elastic Container Service) and ECR (Elastic Container Registry) are two fundamental services offered by AWS to manage containers and container images, respectively. +Running your Node.js application on an EC2 instance will allow this to be accessed on a public domain hosted by AWS. Containerizing your Node.js application through Docker allows for easy deployment via running the application in an isolated environment. Combining these together allows your application to run inside a container while inside a virtual machine which is hosted on the cloud. + ## Tech Stack Docker: Docker is a platform that allows you to package an application and its dependencies into a standardized unit called a container. It provides isolation, portability, and scalability for applications. It allows for easy deployment as it essentially creates a separate virtual machine to run the application on. @@ -17,53 +19,88 @@ Amazon ECR (Elastic Container Registry): ECR is a managed Docker container regis Amazon EC2 (Elastic Compute Cloud): EC2 is AWS's resizable cloud computing service offering virtual machines (instances) for running applications. It provides flexibility to configure and scale computing resources based on demand. + ## Deployment Process +This guide assumes you have already created your Node.js application and are using the Bash Unix shell. + ### Containerize your Node.js application: Using Dockerfile allows one to create a container for the app. -Create a Dockerfile in the root directory of your Node.js application. -Write instructions to build your Node.js app within the Dockerfile. -Build the Docker image locally using docker build -t . -Test the image locally to ensure it works as expected: docker run -p 8080:80 -The first number 8080 is the host port and 80 is the container port. +1) Create a Dockerfile in the root directory of your Node.js application. +2) Write instructions to build your Node.js app within the Dockerfile. +3) Build the Docker image locally using docker build -t . +4) Test the image locally to ensure it works as expected: docker run -p 8080:80 +* You can use any port numbers but we will use 8080:80 as the example +* The first number 8080 is the host port and 80 is the container port. +5) If it is running correctly, you can stop and remove the container using this command (Assuming there are no other containers to be kept). +```bash +$ docker container prune +``` ### Create an ECR repository: -Log in to the AWS Management Console. -Go to the Amazon ECR service. -Create a new repository to store your Docker image. -Push your Docker image to ECR: -Tag your Docker image with the ECR repository URL: -```bash -$ docker tag .dkr.ecr..amazonaws.com/: -``` +1) Log in to the AWS Management Console. +2) Go to the Amazon ECR service. +3) Create a new repository to store your Docker image. +4) Copy the Image URI +5) Push your Docker image to ECR: + Log in to ECR using the AWS CLI: ```bash $ aws ecr get-login-password --region | docker login --username AWS --password-stdin .dkr.ecr..amazonaws.com ``` +Tag your Docker image with the ECR repository URL: +```bash +$ docker tag .dkr.ecr..amazonaws.com/: +``` Push your Docker image to the ECR repository: ```bash $ docker push .dkr.ecr..amazonaws.com/: ``` +- Replace \ with the name you want to label your image with your desired name for the image +- Replace \, \, \, \ with your correct credentials and your ECR name URL. + +You can also instead press the “View push commands” button and follow those instructions. -Replace \ with the name you want to label your image with -Replace \, \, \, \ with your correct credentials and your ECR name URL. -Create an ECS Task Definition: +### Create an ECS Task Definition: Go to the Amazon ECS service in the AWS Management Console. -Create a new task definition specifying your container image from ECR, CPU, memory requirements, etc. - -Create an ECS Cluster: -Create an ECS cluster if you don't have one already. -Configure the ECS cluster settings and select launch type (Fargate or EC2). - -Create an ECS Service: -Define a service within the ECS cluster. -Specify the task definition, desired number of tasks, network configuration, load balancer settings, etc. - -Deploy your ECS Service: -Review and finalize the ECS service settings. -Deploy the service to the ECS cluster. - -# Access your Node.js application -Once the ECS service is up and running, access your Node.js application using the provided service endpoint. +2) Click on "Task Definitions" in the left-hand navigation pane. +3) Click “Create a new task definition” +4) Specify your container image details +- Copy the Image URI from the ECR dashboard +- The container port mapping you established in the previous step +- How much memory it requires (CPU, GPU) +- Click the “Create” button at the bottom + +### Create an ECS Cluster: +Inside the AWS Management Console of ECS cluster +1) Click create an ECS cluster. +2) Configure the ECS cluster settings and select launch type EC2 +3) Select the EC2 instance type +- This is yours to decide how much memory your virtual machine should have. The most common is the t2.micro type which is eligible for the free tier. +4) Click the “Create” button + +### Create an ECS Service: +Inside the same dashboard click on the ECS cluster you created +1) Click on the “Create service” button +2) Ensure the instance type is EC2 instead of Fargate and that it is a **service** not a task +3) Under “Select a task family”, select your created task definition in the previous step +4) Define any other desired number of tasks, network configuration, load balancer settings, etc. +5) After finalizing settings, create the service and run the service + +### Expose the EC2 IP Address to External Connections +Go to the AWS Management Console for EC2 +1) Find the EC2 instance linked to your ECS cluster and click on the security group +2) Press edit inbound rules and add a two new rules +3) Set the type to all traffic and all ports from any IPV4 +4) For the other rule set it to also accept any traffic from all ports from any IPV6 +5) Click save rules + +### Access your Node.js application +Go to the EC2 Management Console and find the same EC2 instance +1) Find its public IPV4 address or DNS and add a colon with the port number at the end +2) Use your browser to access it or any other service (Postman, Insomnia, etc.) +3) You should see either a Cannot GET message or your expected endpoint result + +Note: Set up a test endpoint to confirm that the Node.js application is running From 7a6fdd582e53f0f8d9d173ccb912291994264b71 Mon Sep 17 00:00:00 2001 From: Jazli14 <95947726+Jazli14@users.noreply.github.com> Date: Fri, 24 Nov 2023 20:19:21 -0500 Subject: [PATCH 7/9] Update Deploy_Node.js_Docker_AWS.md Added external links that directs the reader to learn how to incorporate S3 buckets or RDS database --- .../Deploy_Node.js_Docker_AWS.md | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/Topics/Development_Process/Deploy_Node.js_Docker_AWS.md b/Topics/Development_Process/Deploy_Node.js_Docker_AWS.md index be98bf290..53ea1f85d 100644 --- a/Topics/Development_Process/Deploy_Node.js_Docker_AWS.md +++ b/Topics/Development_Process/Deploy_Node.js_Docker_AWS.md @@ -1,5 +1,12 @@ # Node.js Deployment through Docker and AWS +## Table of Contents +### [Overview](#overview-1) +### [Tech Stack](#tech-stack-1) +### [Deployment Process](#deployment-process-1) +### [External Links](#external-links-1) + + ## Overview In the realm of modern software development, containerization has become a standard practice for deploying applications. Docker simplifies this process by packaging applications and their dependencies into containers, ensuring consistency across various environments. Node.js, a popular JavaScript runtime, is often used to build scalable and efficient server-side applications. @@ -19,7 +26,6 @@ Amazon ECR (Elastic Container Registry): ECR is a managed Docker container regis Amazon EC2 (Elastic Compute Cloud): EC2 is AWS's resizable cloud computing service offering virtual machines (instances) for running applications. It provides flexibility to configure and scale computing resources based on demand. - ## Deployment Process This guide assumes you have already created your Node.js application and are using the Bash Unix shell. @@ -104,3 +110,15 @@ Go to the EC2 Management Console and find the same EC2 instance 3) You should see either a Cannot GET message or your expected endpoint result Note: Set up a test endpoint to confirm that the Node.js application is running + +## External Links +Here are some extra links that will help you incorporate other AWS services with Node.js: + +Amazon S3: +* https://medium.com/codebase/using-aws-s3-buckets-in-a-nodejs-app-74da2fc547a6 +* https://www.jsowl.com/how-to-download-a-file-from-aws-s3-in-javascript-node-js/ + +Amazon RDS: +* https://medium.com/@Anas.shahwan/how-to-connect-aws-rds-mysql-nodejs-application-in-5-minutes-40d6fbf09b66 +* https://stackabuse.com/using-aws-rds-with-node-js-and-express-js/ + From 90cc70122b44d491b57a408824b14575cb25401a Mon Sep 17 00:00:00 2001 From: Jazli14 <95947726+Jazli14@users.noreply.github.com> Date: Sat, 25 Nov 2023 14:24:31 -0500 Subject: [PATCH 8/9] Update Deploy_Node.js_Docker_AWS.md Added another link to a more detailed version of my article from a post by Raphael Mansuy --- Topics/Development_Process/Deploy_Node.js_Docker_AWS.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Topics/Development_Process/Deploy_Node.js_Docker_AWS.md b/Topics/Development_Process/Deploy_Node.js_Docker_AWS.md index 53ea1f85d..6735f1967 100644 --- a/Topics/Development_Process/Deploy_Node.js_Docker_AWS.md +++ b/Topics/Development_Process/Deploy_Node.js_Docker_AWS.md @@ -68,7 +68,6 @@ $ docker push .dkr.ecr..amazonaws.com/: You can also instead press the “View push commands” button and follow those instructions. - ### Create an ECS Task Definition: Go to the Amazon ECS service in the AWS Management Console. 2) Click on "Task Definitions" in the left-hand navigation pane. @@ -112,7 +111,10 @@ Go to the EC2 Management Console and find the same EC2 instance Note: Set up a test endpoint to confirm that the Node.js application is running ## External Links -Here are some extra links that will help you incorporate other AWS services with Node.js: +A more detailed version of my article with more in depth steps is available here if you need more help, posted by Raphael Mansuy: +* https://dev.to/raphaelmansuy/deploy-a-docker-app-to-aws-using-ecs-3i1g + +Here are some extra links that will help you incorporate other AWS services with Node.js like an RDS database or a S3 bucket: Amazon S3: * https://medium.com/codebase/using-aws-s3-buckets-in-a-nodejs-app-74da2fc547a6 From 693a6638c224191bc6af484afae06d7a41fc8ee2 Mon Sep 17 00:00:00 2001 From: Jazli14 <95947726+Jazli14@users.noreply.github.com> Date: Sat, 25 Nov 2023 15:39:47 -0500 Subject: [PATCH 9/9] Update Deploy_Node.js_Docker_AWS.md Added a two small diagrams of how the Node.js app will be deployed through Docker and AWS --- .../Deploy_Node.js_Docker_AWS.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/Topics/Development_Process/Deploy_Node.js_Docker_AWS.md b/Topics/Development_Process/Deploy_Node.js_Docker_AWS.md index 6735f1967..3177e2bac 100644 --- a/Topics/Development_Process/Deploy_Node.js_Docker_AWS.md +++ b/Topics/Development_Process/Deploy_Node.js_Docker_AWS.md @@ -6,7 +6,6 @@ ### [Deployment Process](#deployment-process-1) ### [External Links](#external-links-1) - ## Overview In the realm of modern software development, containerization has become a standard practice for deploying applications. Docker simplifies this process by packaging applications and their dependencies into containers, ensuring consistency across various environments. Node.js, a popular JavaScript runtime, is often used to build scalable and efficient server-side applications. @@ -14,6 +13,19 @@ AWS (Amazon Web Services) provides a suite of cloud services that enable develop Running your Node.js application on an EC2 instance will allow this to be accessed on a public domain hosted by AWS. Containerizing your Node.js application through Docker allows for easy deployment via running the application in an isolated environment. Combining these together allows your application to run inside a container while inside a virtual machine which is hosted on the cloud. +Here is a rough visualization of what the process of deploying the application will be like: +

+ +

+ + +This diagram shows containerizing a Node.js application by building an image of it and pushing it to an Amazon ECR Repository + +

+ +

+This followup diagram shows how an ECR Repository connects to Amazon ECS and is then deployed to an EC2 instance + ## Tech Stack Docker: Docker is a platform that allows you to package an application and its dependencies into a standardized unit called a container. It provides isolation, portability, and scalability for applications. It allows for easy deployment as it essentially creates a separate virtual machine to run the application on.