CI/CD Pipeline Using GitHub Action| Auto Deploy Nodejs API on AWS EC2 step by step in Hindi

Shree Learning · Intermediate ·☁️ DevOps & Cloud ·3y ago

About this lesson

In this video we will see how to set GitHub Action for cicd with aws EC2 with an example of nodejs API in hindi GitHub workflows Cicd pipeline and auto deploy to AWS EC2 CICD pipeline for nodejs express application in hindi We will Use github action to set up CI CD pipeline to Deploy your project to AWS EC2 Full guide to automatic deployment to AWS EC2 using GitHub Action with nodejs api as example in hindi It will automatic test build and deploy to aws ec2 after every changes commit and merged step 1- login to aws console and create an ec2 instance step 2- Login to ec2 instance step 3- install nodejs and nginx sudo apt update curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash - sudo apt-get install nodejs sudo apt-get install nginx step 4- push your projects to github step5 - create github action it will create a yml file under .github/workflow just edit yml file acording to your project step 6- set up github action on ec2 Not start with sudo After GitHub configuration run this command sudo ./svc.sh install sudo ./svc.sh start step 7- install pm2 and run backend in background npm i pm2 -g pm2 start server.js step 8- add the command in yml script of project to restart after every commit -run: sudo pm2 restart server.js step 9- config nginx and restart it Cd /etc/nginx Cd sites-available sudo nano default location /api/ { proxy_pass http://localhost:8000/; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } sudo systemctl restart nginx #cicd #githubactions #github #ec2 #nginx #nodejstutorial

Original Description

In this video we will see how to set GitHub Action for cicd with aws EC2 with an example of nodejs API in hindi GitHub workflows Cicd pipeline and auto deploy to AWS EC2 CICD pipeline for nodejs express application in hindi We will Use github action to set up CI CD pipeline to Deploy your project to AWS EC2 Full guide to automatic deployment to AWS EC2 using GitHub Action with nodejs api as example in hindi It will automatic test build and deploy to aws ec2 after every changes commit and merged step 1- login to aws console and create an ec2 instance step 2- Login to ec2 instance step 3- install nodejs and nginx sudo apt update curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash - sudo apt-get install nodejs sudo apt-get install nginx step 4- push your projects to github step5 - create github action it will create a yml file under .github/workflow just edit yml file acording to your project step 6- set up github action on ec2 Not start with sudo After GitHub configuration run this command sudo ./svc.sh install sudo ./svc.sh start step 7- install pm2 and run backend in background npm i pm2 -g pm2 start server.js step 8- add the command in yml script of project to restart after every commit -run: sudo pm2 restart server.js step 9- config nginx and restart it Cd /etc/nginx Cd sites-available sudo nano default location /api/ { proxy_pass http://localhost:8000/; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } sudo systemctl restart nginx #cicd #githubactions #github #ec2 #nginx #nodejstutorial
Watch on YouTube ↗ (saves to browser)
Sign in to unlock AI tutor explanation · ⚡30

Related Reads

📰
Scaling Globally: Best Practices in Cloud CI/CD
Learn best practices for scaling globally with secure and highly-available cloud CI/CD infrastructure
Medium · DevOps
📰
Troubleshooting a GitHub Actions CI/CD Pipeline on AWS: 10 Real-World Failures and Fixes
Learn to troubleshoot common GitHub Actions CI/CD pipeline failures on AWS, including IAM permission errors and S3 access issues, to improve your DevOps workflow
Medium · DevOps
📰
Day 13: Cron, Crontab, and Locking Down Who Gets to Schedule Jobs
Learn to manage scheduled jobs with Cron, Crontab, and restrict access to scheduling for improved system security
Medium · DevOps
📰
Dev Log 01: Optimizing Worker Memory Footprints Using Hono.js
Optimize worker memory footprints using Hono.js to achieve sub-10ms response times
Dev.to · joseph kam
Up next
AWS, Azure, GCP: The One Thing Every Business Gets Wrong
AI Daily
Watch →