DevOps Tutorial : Simple DevOps Project 2 using Node JS Web App | Docker | Jenkins

Опубликовано: 09 Август 2020
на канале: Abhishek Modi
27,277
611

Hey,

Below are the Steps to Create Simple DevOps Project Using Node JS application .
Document URL
Git URL : https://github.com/Abhishek08/Docker/...

Steps 1 - Install Node Js on Ubuntu Machine
sudo apt update

sudo apt install nodejs

sudo apt install npm

nodejs -v // To check the node JS version
Step 2 - Download the Publish Over SSH plugins
Key -- define the private Key ( you will get from .pem while when you will open as text file)

ssh Server -

Name - define the name of the server.
HostName - Provide the IP address of your server.
UserName - Provide the user name here ex. if we are using Ubuntu ec2 instance then username is ubuntu

Click Save and Apply
Step 3 - Create the Free Style Node JS project .
Git URL - https://github.com/Abhishek08/node-js...

WebHook Connection URL - http://IPADDRESS/github-webhook/ (push)

BUILD - npm install // to download all the dependecines
npm test // to perform test case execution

tar czf Node.tar.gz node_modules index.js package.json public app.json
Step 4 - Post Build Action Define below details.
Source file : **/*.gz

Exec Command

mv ./home/ubuntu/one/node-js-sample/Node.tar.gz /home/ubuntu/test/Node.tar.gz;
cd /home/ubuntu/test/
tar -xf Node.tar.gz ;
docker rmi nodeimage;
docker stop nodecontainer;
docker rm nodecontainer;
docker build -t nodeimage .;
docker run -d --name nodecontainer -p 5001:5000 nodeimage;
Step 5 - Docker File in Node Js server
FROM node:latest

MAINTAINER Abhishek Modi

RUN echo "Tryin to build my first application"

COPY . /var/www

WORKDIR /var/www

RUN npm install

EXPOSE 3000

ENTRYPOINT ["npm","start"]

Reference :
https://github.com/Abhishek08/Docker

YOUTUBE PLAYLIST
https://www.youtube.com/channel/UCTPg...


#DockerSwarm #WhatIsDockerSwarm #DockerTutorials #DockerTraining #DevOpsTools #DevOpsTraining #DockerCommands #DockerForBeginners #DockerFreeTutorials #DockerforDevOps
#quarantine2020 #quarantinelearning

#RealTimeDevOpsProject #RealtimeProject

#DockerImages #DockerContainers #DockerTutorials #DevOpsTools #DevOpsTraining #DockerFreeTutorials #DockerforDevOps#Docker2020 #DockerTutorial2020
#DockerVolume #DockerBindMount #SimpleDevOpsProject #NodeJsProject


На этой странице сайта вы можете посмотреть видео онлайн DevOps Tutorial : Simple DevOps Project 2 using Node JS Web App | Docker | Jenkins длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь Abhishek Modi 09 Август 2020, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 27,277 раз и оно понравилось 611 зрителям. Приятного просмотра!