Continuous Deployment using GitHub Actions | Auto Deploy MERN Stack | AWS EC2 | CICD Pipeline

แชร์
ฝัง
  • เผยแพร่เมื่อ 9 ก.พ. 2025
  • In this tutorial we are going to create CICD Pipeline for Full stack project In order to setup continues Deployment from GitHub to server.
    Once you setup CICD Pipeline then you don't need to worry about deployment after that you just need to commit changes to GitHub it will automatically build and deploy your changes.
    We Will Also use AWS EC2 Instance and also learn how to setup inbound rules to Allow ports to communicate with server.
    #AWS #GitHubActions #CICD

ความคิดเห็น • 97

  • @rog0079
    @rog0079 ปีที่แล้ว +5

    Thanks Mahessssssshhhhh Dal..... :D (kidding :P, great video by the way!)

  • @sefakpsz
    @sefakpsz ปีที่แล้ว

    You are the best. God bless you!

  • @shubhamverma1407
    @shubhamverma1407 2 ปีที่แล้ว

    bro this is amazing, to the point, no bullshit

  • @mdshadab3470
    @mdshadab3470 ปีที่แล้ว

    Exactly the video I was looking for great explanation bro🔥🔥

  • @bharathkumar2007
    @bharathkumar2007 ปีที่แล้ว

    Fantastic tutorial, Thanks Mahesh.

  • @full.stacked
    @full.stacked ปีที่แล้ว

    Nice end-to-end tutorial. Thank you

  • @learnsmart1812
    @learnsmart1812 2 ปีที่แล้ว +1

    Thanks for clear explanation. Really nice👍

    • @maheshkariya
      @maheshkariya  2 ปีที่แล้ว +1

      You are welcome and don't forget to subscribe if you haven't already

  • @MohdAqib-b8g
    @MohdAqib-b8g ปีที่แล้ว

    This video is amazing, Thankyou!

  • @hegelchambamorocho250
    @hegelchambamorocho250 2 ปีที่แล้ว +1

    It helped me a lot, thank you very much 👍

    • @maheshkariya
      @maheshkariya  2 ปีที่แล้ว

      Thanks and don’t forget to subscribe

  • @RaviKumar-uq4ri
    @RaviKumar-uq4ri 2 ปีที่แล้ว +1

    This was good Example thank you

  • @bubonik4957
    @bubonik4957 2 ปีที่แล้ว

    Thank you, brother, very educational!

  • @adesojialu1051
    @adesojialu1051 ปีที่แล้ว +1

    Thank you for this, please could you do another approach using kubernetes and docker for a react frontend and express backend with postgres database

  • @deepaaa5215
    @deepaaa5215 2 ปีที่แล้ว

    thnks for this awesome tutorial @mahesh

  • @3bkareeno
    @3bkareeno 2 ปีที่แล้ว

    This is really helpful. Thank you.

    • @maheshkariya
      @maheshkariya  2 ปีที่แล้ว

      Glad it was helpful! And Don't forget to subscribe if you enjoyed Okay

  • @prasadlakshan5407
    @prasadlakshan5407 ปีที่แล้ว +1

    Thanks for the video, One question I have Who we manage the env of the backend with this manner

  • @kasir-barati
    @kasir-barati 2 หลายเดือนก่อน

    Why did you use sudo, it works without one, does not it? Or at least it did for me.

  • @221miteshdevganiya2
    @221miteshdevganiya2 2 หลายเดือนก่อน

    if i don't want to get 404 and 403 in server when pipeline is running in github action so it there any option ?

  • @tajihr
    @tajihr ปีที่แล้ว

    thank you for video! I have a question.. so I do not need to git clone when using github actions ? and if I already git clone and deploy the app, if I want to set up auto deploy with github actions, I need to remove the foler for git?

  • @parrapaTh3Rappa
    @parrapaTh3Rappa 2 ปีที่แล้ว +2

    Awesome information, thank you!
    Although I don't think the "npm run build" is necessary on the front end since there's already a "npm run build --if-present" before that that builds a project as long as there's a "build" script in your package.json (which there is, otherwise you wouldn't be able to run npm run build).

    • @maheshkariya
      @maheshkariya  2 ปีที่แล้ว

      Thanks and don’t forget to subscribe if you haven’t already Okay 👍

  • @tyscyre2256
    @tyscyre2256 ปีที่แล้ว +2

    Thanks for the video. I am using the free tier on AWS and whenever I create more than one runner , the first one goes offline . Is there a way around it?

    • @adesojialu1051
      @adesojialu1051 ปีที่แล้ว +1

      increase your instance size to t3.medium

  • @neerajarao7333
    @neerajarao7333 ปีที่แล้ว

    Thanks for this vedio. However can u make a updated vedio with Basic MERN THAT INTGRATES EVERY STACK (MERN) end to end so that itwould be helpful where changes needed while integrating frontend to backend .

  • @atulbhandari4268
    @atulbhandari4268 2 ปีที่แล้ว

    Nice

  • @mohithreddyvuyyuru
    @mohithreddyvuyyuru 2 ปีที่แล้ว +2

    Reply fast
    AWS ssh client terminal was struck when the frontend nodejs.yml running and taking too much time at *npm run build --if-present*

    • @somunelavalli
      @somunelavalli ปีที่แล้ว +1

      @mohithreddyvuyyuru, Did you solve above issue ? if solved could you please help me now i am facing the same issue

    • @maheshkariya
      @maheshkariya  ปีที่แล้ว

      Use t2.small or higher instances

  • @Willssucceed
    @Willssucceed 2 ปีที่แล้ว

    Thnks bro. it is gud.. but you could be slow and can explain things why we doing it.

  • @vysakhrn4811
    @vysakhrn4811 2 ปีที่แล้ว

    thanks man,thank u very much

    • @maheshkariya
      @maheshkariya  2 ปีที่แล้ว

      Dont forgetto subscribe okay

  • @TECHKMR-SOLUTIONS
    @TECHKMR-SOLUTIONS 2 ปีที่แล้ว

    great

  • @AndreasEngly
    @AndreasEngly 2 ปีที่แล้ว +2

    Thank you for a thorough tutorial. I face one issue however. When I try to deploy my frontend, "Run npm ci" keeps running. Eventually it disconnects. Any suggestions?

    • @saisankethravva5706
      @saisankethravva5706 2 ปีที่แล้ว

      I am also facing the same issue, can anyone please help

    • @adesojialu1051
      @adesojialu1051 ปีที่แล้ว

      me too@@saisankethravva5706

  • @witchestify
    @witchestify ปีที่แล้ว

    hi sir, i havefollowing this tutorial, and when github action running it's job. It suddenly freeze and ec2 system checks said it's not reachable? do you know why?

  • @adesojialu1051
    @adesojialu1051 ปีที่แล้ว

    how does .env file work here or it's not needed because of when an application is connected to postgres database

  • @adesojialu1051
    @adesojialu1051 ปีที่แล้ว

    I increased the instance size and the frontend and everything runs just fine

  • @princearthur4868
    @princearthur4868 2 ปีที่แล้ว

    Nice tutorial

  • @kasir-barati
    @kasir-barati 2 หลายเดือนก่อน

    I am getting a 404 error when I navigate to index. Anyone with similar issue? I did a quick search and it seems it is related to the subject of permissions. Note: the default root was working just fine with the default index.hml files

  • @sajidkhaki4561
    @sajidkhaki4561 ปีที่แล้ว

    @Mahesh Kariya I have done same but when it try to visit the URL it is showing not reachable. No nginx screen is displayed. ON terminal version is showing as nginx version: nginx/1.18.0 (Ubuntu)

    • @muhammadshehroze6691
      @muhammadshehroze6691 ปีที่แล้ว

      if u find solution then help me . i am also facing same problem.

  • @Selvakumar-hd6zc
    @Selvakumar-hd6zc ปีที่แล้ว

    Hi Magesh, I have problem with codebuild when ever my code build has started my aws EC2 server connection is went to offline and the code build and push is not happening how can i resolve this issue any suggestion?

    • @maheshkariya
      @maheshkariya  ปีที่แล้ว

      It’s mahesh

    • @somunelavalli
      @somunelavalli ปีที่แล้ว

      @Selvakumar-hd6zc, Did you find any solution for abovr you issue ?

  • @sksafikuddinkhan5935
    @sksafikuddinkhan5935 ปีที่แล้ว

    Hi bro, can you let me know, how to achieve CD with the help of actions

  • @Gk_tcg
    @Gk_tcg ปีที่แล้ว

    Cannot perform an interactive login from a non TTY device

  • @alrazy12
    @alrazy12 2 ปีที่แล้ว +1

    Hi can you help me im trying to implement same example but getting an error exit with error

  • @punittewani9255
    @punittewani9255 2 ปีที่แล้ว +1

    My Backend is not working when i hit ip address with /api/ param it shows cannot GET / But particular API is present at my backend route file

  • @muhammadshehroze6691
    @muhammadshehroze6691 ปีที่แล้ว

    I have done same but when it try to visit the URL it is showing not reachable. No nginx screen is displayed. ON terminal version is showing as nginx version: nginx/1.18.0 (Ubuntu)

  • @rhmtin
    @rhmtin 2 ปีที่แล้ว

    Hi, if i using droplet in digitalocean, it’s same?

    • @maheshkariya
      @maheshkariya  2 ปีที่แล้ว +1

      Yes 👍

    • @rhmtin
      @rhmtin 2 ปีที่แล้ว

      @@maheshkariya Thank you One more thing, if I have multiple domains, how do I do that? For example in domain a for frontend and subdomain a for backend, and so on in domain b, c, etc. Can you explain? maybe in a new tutorial😁

  • @arnavbansal4259
    @arnavbansal4259 3 ปีที่แล้ว +2

    _work directory not shown after initiating the GitHub action runner on EC2

    • @maheshkariya
      @maheshkariya  3 ปีที่แล้ว

      It will generate automatically once you commit something

  • @dipanshugupta5578
    @dipanshugupta5578 6 หลายเดือนก่อน

    How, and when did you added node.js.yml file there is no explanation of that one.

  • @fin31337
    @fin31337 3 ปีที่แล้ว

    dude, great tutorial, big thanks
    just curious, does your tab button broken?🙃

  • @fin31337
    @fin31337 3 ปีที่แล้ว +1

    Why is sudo required to run the nodejs app?

    • @maheshkariya
      @maheshkariya  3 ปีที่แล้ว

      Don't worry No need but pm2 I thing will run with sudo.

  • @Prashanthsheri-l4x
    @Prashanthsheri-l4x ปีที่แล้ว +1

    why can't you combine CICD together??

  • @antonshliakhtin5490
    @antonshliakhtin5490 11 หลายเดือนก่อน

    помогло!

  • @muhammadsafvankv9394
    @muhammadsafvankv9394 ปีที่แล้ว

    i dont get a _work directory

  • @achyutghimire2266
    @achyutghimire2266 2 ปีที่แล้ว +8

    you are refering to MERN... this project is not MERN.... can you actually work on MERN project which involves Mongodb/MYSQL database and where frontend and backend are actually talking to each other and not "DIVORCED" like yours ? I am able to create workflows like yours but I have not been able to do it for actual MERN, which made me land here... so hoping to get some help

  • @gandalfg1479
    @gandalfg1479 2 ปีที่แล้ว

    Hey! So at the 5th minute where u do sudo ssh -i ".pem" etc etc, it does not work for me. I get the error login as ubuntu rather than root. I cant find a solution online for this, so the rest of the video is useless to me as I cannot proceed. CAn u help?

  • @balasubramaniam7904
    @balasubramaniam7904 ปีที่แล้ว

    cannot see my output

  • @hemantkumar-ug7jx
    @hemantkumar-ug7jx ปีที่แล้ว

    thanks a lot but react app nahi chal raha

  • @sebabratakundu
    @sebabratakundu ปีที่แล้ว

    Nice example. But I have one concern. When the front-end build is running the website is not working. It means customer will going to face downtime. how can we prevent it?

  • @PixelPioneer-t3q
    @PixelPioneer-t3q 2 ปีที่แล้ว

    This was educational but, i ran into a problem with the way you configure your workflow for your backend. The instructions you give in the YML file are wrong considering your express server does not run tests nor does it run build. the command for executing such command for me in particular is npm start. Now on the front end you must build before running but this is a huge step missed.

  • @rishabhranjan5047
    @rishabhranjan5047 ปีที่แล้ว

    do anyone knows how to set up .env for this please give me a solution

  • @arnavbansal4259
    @arnavbansal4259 3 ปีที่แล้ว +1

    How to set environment variables for backend?

    • @maheshkariya
      @maheshkariya  3 ปีที่แล้ว +1

      I have showed in video, You just need to pass while using docker and you can access it by process.env else if you are not using docker just use dotenv npm package.

    • @arnavbansal4259
      @arnavbansal4259 3 ปีที่แล้ว

      @@maheshkariya Is there any .config file for nginx where I can set environment variables for backend?

    • @maheshkariya
      @maheshkariya  3 ปีที่แล้ว

      @@arnavbansal4259 Oh! Good one, You need to dig into ngnx docker doc to provide file to setup enviroments. seeps easy actually you can create custom file for env and you can pas path of your local in nginx while creating docker compose

  • @432aniketkadam4
    @432aniketkadam4 หลายเดือนก่อน

    Remove background music

  • @manshikumar8606
    @manshikumar8606 2 ปีที่แล้ว +1

    Hi, I need help regarding my project for automating deployment. How can I contact you?