From e7b56de4c2f38239869096ef5de09deef9253ad4 Mon Sep 17 00:00:00 2001 From: gunish-dt Date: Mon, 7 Mar 2022 11:54:55 +0530 Subject: [PATCH] Added Video URL --- README.md | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index fcd9eb8b..b93cd241 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,11 @@ # getting-started-nodejs +[![Demo Video](https://img.youtube.com/vi/9u-pKiWV-tM/0.jpg)](https://www.youtube.com/watch?v=9u-pKiWV-tM&t=2s) + This application uses the `node` container obtained from the [Docker Hub](https://hub.docker.com/_/node/) ## Setup + Clone this repo and cd into the directory: ``` @@ -10,38 +13,42 @@ git clone https://github.com/devtron-labs/getting-started-nodejs cd getting-started-nodejs ``` -You can run the sample app while executing this command - +You can run the sample app while executing this command - + ``` node app.js ``` Now point your browser at `http://localhost:8080` to see: + ``` {"cities":["Amsterdam","Berlin","New York","San Francisco","Tokyo"]} ``` ## Getting started with deploying application through Devtron -Lets see how to deploy a custom nodejs app through Devtron. -Make sure Global Configurations are successfully saved and validated before deploying your application. +Lets see how to deploy a custom nodejs app through Devtron. +Make sure Global Configurations are successfully saved and validated before deploying your application. -**STEP 1** +**STEP 1** Login into your Devtron Dashboard, Go to >> Applications >> Create new App. Give an appropriate name to this App, choose the project in which you want to keep the app, and create it. -**STEP 2** +**STEP 2** After creating the app, setup the configurations. Copy the repo URL https://github.com/devtron-labs/getting-started-nodejs and paste it the Git repo section of your App. Click save and move to next config. -**STEP 3** -Now choose your Docker build config, the repository where you want to keep your CI build image. Select the container registry from the drop-down. +**STEP 3** +Now choose your Docker build config, the repository where you want to keep your CI build image. Select the container registry from the drop-down. -**STEP 4** +**STEP 4** Coming up next is configuring the deployment template. As this is a very simple nodejs application we will be only covering the required the configs. + ``` ContainerPort : port : 8080 servicePort : 80 ``` -`8080` is the port number on which my nodejs application is running. + +`8080` is the port number on which my nodejs application is running. Set the resource limits & requests as given below - @@ -55,7 +62,7 @@ resources: memory: 10Mi ``` -Now, select the serviceType, keep it as `LoadBalancer`. +Now, select the serviceType, keep it as `LoadBalancer`. ``` service: @@ -72,11 +79,11 @@ You can add or create secrets or configmaps as per your requirement. These value That’s it, now trigger your CI pipeline by selecting the latest image and deploy it on your chosen project. **STEP 8** -After the successful deployment, check out your service manifest for fetching the LoadBalancer URL from the dashboard present in the App Details section. +After the successful deployment, check out your service manifest for fetching the LoadBalancer URL from the dashboard present in the App Details section. ![](/gifs/fetching_loadbalancer.gif) -**STEP 9** +**STEP 9** Use this URL on your browser and you can get the output as. ``` @@ -86,4 +93,3 @@ Use this URL on your browser and you can get the output as. Find out a detailed documentation about the configurations from here - https://docs.devtron.ai/devtron/user-guide/creating-application --- -