Deploy MERN Stack App On AWS EC2 Using GitHub Actions

Поделиться
HTML-код
  • Опубликовано: 18 ноя 2024

Комментарии • 110

  • @shwetabhat9981
    @shwetabhat9981 9 месяцев назад +1

    Amazing tutorial sir . Thank you for it ... deployment in MERN is pretty less talked about on RUclips channels atleast . Im glad I bumbed into this . Keep growing 🎉

    • @IntegrationNinjas
      @IntegrationNinjas  9 месяцев назад

      Thanks for exploring out this video and I am glad to hear that it was helpful.

  • @darshankhatri9625
    @darshankhatri9625 9 месяцев назад +3

    Was looking for this ,
    Thanks for explaining thoroughly 👍.

  • @VipinRaj_dev
    @VipinRaj_dev 9 месяцев назад +2

    Thanks a lot sir, i have been searching for this video for a long time. It is an amazing tutorial in a simple and understandable manner. It is actually covering all the topics . i have completed this tutorial without having any unexpected errors. keep going sir

    • @IntegrationNinjas
      @IntegrationNinjas  9 месяцев назад +1

      You're very welcome! I'm thrilled to hear that you found the tutorial helpful and that you were able to complete it without any unexpected errors. Your positive feedback is truly appreciated. If you have any more questions or if there's anything else you'd like to learn, feel free to let me know. Keep coding, and thanks for your support!

    • @emmalux2
      @emmalux2 Месяц назад

      @@IntegrationNinjas pls where is the repo for the used source code?

  • @nigelgman9538
    @nigelgman9538 4 месяца назад +3

    Great video, well explained. When you get time, may you make a video of EC2 deployment using a MERN stack mono-repo. It will be nice to see build and deploy actions that combine multiple images together eg frontend and backend

  • @vishnuitsrocking
    @vishnuitsrocking 3 месяца назад +2

    Bro! You're amazing!😎Fantastic tutorial.💥 Appreciate your hard work. 👨‍💻Looking for more

  • @kareemlateefyomi8690
    @kareemlateefyomi8690 9 месяцев назад +1

    Great tutorial man. Your videos are great . I hope people get to know this channel as I have 👍

    • @IntegrationNinjas
      @IntegrationNinjas  9 месяцев назад +1

      Thanks for your kind words. It will motivate me to come up with more valuable content.

  • @todayisyourfuture
    @todayisyourfuture 7 месяцев назад +1

    Wonderdul content, thanks a lot. Try to deploy only react app with the API that gives you backend

  • @Krishnesh_Unnawi
    @Krishnesh_Unnawi 3 месяца назад

    Well explained tutorial, Bring one with Kubernetes as well.

  • @jabidjimenez5150
    @jabidjimenez5150 2 месяца назад +1

    Great Tutorial man, thanks for sharing Sachin! if the sample user is user name 😂

  • @hungnguyenmanh5333
    @hungnguyenmanh5333 6 месяцев назад +1

    Hello. Thank you for helping me through this video. But I want to add domain and ssl Nginx, ReactJS when setting up via Docker.
    Sorry that my English is not good
    Looking forward to hearing from you and have a nice day

    • @IntegrationNinjas
      @IntegrationNinjas  6 месяцев назад +1

      Thank you for your comment! I'm glad the video helped you. For SSL:
      Once you have your domain, you'll need to configure the DNS records to point to your EC2 instance's public IP address. You can do this through your domain registrar's control panel.
      You can obtain a free SSL certificate from Amazon Certificate Manager (ACM). This service allows you to generate and manage SSL/TLS certificates for your AWS resources.
      With Docker, you'll likely use a separate container for Nginx as a reverse proxy in front of your Node.js container.
      I will try to create a full setup video soon.

    • @hungnguyenmanh5333
      @hungnguyenmanh5333 6 месяцев назад

      @@IntegrationNinjas Thank you so much

  • @sabarivr757
    @sabarivr757 2 месяца назад +3

    I have successfuly deployed my app, but when navigate to other routes and refresh it is showing 404 nginx

    • @arnishad3208
      @arnishad3208 29 дней назад

      You can add nginx config file to your code base, it will solve this problem

  • @navnathsangalephotography4968
    @navnathsangalephotography4968 7 месяцев назад +2

    i have followed a tutorial but thing is that when i go in github actions it is not showing 1 worlkflow created but i didnt see its running or not

    • @IntegrationNinjas
      @IntegrationNinjas  7 месяцев назад +1

      Is the workflow created or not? I couldn't understand what you said.
      Try below things if workflow not triggered:
      1. Double-check if the workflow YAML file is located in the .github/workflows directory within your repository.
      2. Verify the workflow trigger in the YAML file. Some triggers, like push or workflow_dispatch, require the workflow file to be merged into the default branch (usually main or master) before they appear in the Actions tab.
      3. Make sure the workflow YAML file has no syntax errors. Errors can prevent the workflow from being displayed. You can use a YAML validator online to check the syntax.

    • @navnathsangalephotography4968
      @navnathsangalephotography4968 7 месяцев назад +1

      Ok I will check it and let you know sir

    • @navnathsangalephotography4968
      @navnathsangalephotography4968 7 месяцев назад

      Hii sir can you please share your number I have tried lots of time but actions are not working I have followed the video precisely and 9-10 times

    • @IntegrationNinjas
      @IntegrationNinjas  7 месяцев назад +1

      Please ping the error message you are getting while running. Or message the error screenshots on Instagram account : integrationninjas

    • @navnathsangalephotography4968
      @navnathsangalephotography4968 7 месяцев назад

      @@IntegrationNinjas ok sir

  • @TheArunKushwahaa
    @TheArunKushwahaa 8 месяцев назад +1

    Hey man, thanks for this valuable information, Can you make a video on AWS Serverless Lamda about how to use the lambda, and one more thing needed like how to integrate domain name with aws, and how to add https in the URL, I really need this

    • @IntegrationNinjas
      @IntegrationNinjas  8 месяцев назад

      Thanks. You can refer below video for AWS Lambda:
      Create & Deploy AWS Lambda Function In Java Using GitHub Actions
      ruclips.net/video/1lLdzSKVH3M/видео.html
      Domain part probably I will cover in some other video.

  • @naobeshiaw1645
    @naobeshiaw1645 Месяц назад

    This video is fantastic. However, I’ve encountered some problems with nginx. I have uploaded onto EC2 successfully, but when I get access to frontend it shows welcome to nginx instead of my homepage. Index.html file is properly located in the docker container.
    Idk if this has something to do with vite

  • @garvitsharma9505
    @garvitsharma9505 9 месяцев назад +1

    Great one 👍

  • @SLASH1441
    @SLASH1441 4 месяца назад

    Hi, thank you very much for this tutorial.
    Does someone else stuck in minute 32 ?
    I missed the part where you configure the github actions for the project. I am stuck on minute 32, I check the actions tab on my backend repository but it's empty. Please help

  • @frostybitebull4586
    @frostybitebull4586 9 месяцев назад +1

    Very helpful video

  • @VipinRaj_dev
    @VipinRaj_dev 8 месяцев назад +1

    sir can you please make a video to deploy a nextjs (above 13.4 , app router) , typescript , node express , mongodb project with docker and github actions🙏

    • @IntegrationNinjas
      @IntegrationNinjas  8 месяцев назад

      Sure, I will try that out and will upload soon.

  • @easwarapriyan9763
    @easwarapriyan9763 9 месяцев назад +1

    Great videos 🎉

  • @ghulamdastgeer6587
    @ghulamdastgeer6587 9 месяцев назад +1

    Sir can you made a video for PERN stack deployment like this video

  • @learner2998
    @learner2998 9 месяцев назад +1

    Great one, but when we containerize our server, we have included our .env file it has the mognodb url . so we should include it or not ? ,

    • @IntegrationNinjas
      @IntegrationNinjas  9 месяцев назад +1

      It is not required to add since we have already set these values in docker file as environment variables.

  • @ShivamSingh-hp2id
    @ShivamSingh-hp2id 5 месяцев назад

    Hello can you please suggest, how can i setup this with docker-compose, as we dont have docker-compose file on server, i need to create a file using workflow job and then i'm starting docker-compose up.
    Is there any batter way, please suggest.

  • @shamshad_hussain
    @shamshad_hussain 8 дней назад

    you made things complicated you should make a docker compose.yaml file. only need to run 'docker compose up' very simple & easy

  • @deepakgautam6904
    @deepakgautam6904 Месяц назад

    I want to know can we run that port 80 both front end and backend in same server how

  • @prachideokate6309
    @prachideokate6309 7 месяцев назад +1

    What if I have frontend and backend in same github repository?

    • @IntegrationNinjas
      @IntegrationNinjas  7 месяцев назад

      you can change the directory to frontend/backend and can build the project.

    • @prachideokate6309
      @prachideokate6309 7 месяцев назад +1

      @@IntegrationNinjas Thanks but can you send me any example or can you make any video

    • @IntegrationNinjas
      @IntegrationNinjas  7 месяцев назад

      @@prachideokate6309 sure, I will try to create such project and create a video.

    • @prachideokate6309
      @prachideokate6309 7 месяцев назад

      @@IntegrationNinjas Can we connect? Can I get your email id or anything?

    • @shreyans7124
      @shreyans7124 6 месяцев назад

      @@IntegrationNinjasWhat does this mean? Do you ask to push frontend and backend as separate repos?

  • @narendramedidhi8908
    @narendramedidhi8908 3 месяца назад

    bro after push the changes into github there is nothing showing in the actions
    please clarify these error

  • @bluemaroon10
    @bluemaroon10 8 месяцев назад +1

    Hello brother,
    I'm facing an issue, as I'm showing github secrets you have added aws secret keys but not mention in video.
    Can you please help me to resolve issue

    • @IntegrationNinjas
      @IntegrationNinjas  8 месяцев назад

      AWS secrets has been added for other workflow, not for this one. In this video you just need to store docker username, password and mongodb password.

  • @rahulray7683
    @rahulray7683 9 месяцев назад +1

    I'm waiting this video

    • @rahulray7683
      @rahulray7683 9 месяцев назад

      Can you provide more video

    • @IntegrationNinjas
      @IntegrationNinjas  9 месяцев назад

      Please explore this and share your feedback that will be helpful.

  • @rahulray7683
    @rahulray7683 9 месяцев назад +1

    Can you make a video PERN Stack with Docker and Without Docker

  • @ExploreSnap2024
    @ExploreSnap2024 Месяц назад

    Thanks man. After extensive research, I learned that there are multiple ways to deploy projects on AWS. I don't have previous experience with AWS deployments, and this is the first time I've successfully deployed a MERN project on AWS. Can I use this method for real-time projects? Is this approach more costly than other approaches? Maybe I'm asking a silly question, but please don't mind.

    • @scientofia4108
      @scientofia4108 27 дней назад +1

      Pls help me I want to deploy my mern project if u can guide me with this it would be very helpful

    • @ExploreSnap2024
      @ExploreSnap2024 10 дней назад

      @scientofia4108 please share your mail i will contact with you

  • @anupamagarwal6569
    @anupamagarwal6569 8 месяцев назад +1

    I have .env file in node project and there are approx 15 key value pair. how i can manage that with yml file mentioned in video?

    • @IntegrationNinjas
      @IntegrationNinjas  8 месяцев назад

      You can simply add more --build-arg flags to your docker build command, each specifying a different argument name and value. Here's how it would look with two additional arguments:
      docker build -t integrationninjas/reactjs-app \
      --build-arg REACT_APP_NODE_ENV='production' \
      --build-arg REACT_APP_SERVER_BASE_URL='${{ secrets.REACT_APP_SERVER_BASE_URL }}' \
      --build-arg DB_HOST='your_database_host' \
      --build-arg DB_USERNAME='your_database_username'
      Accessing Arguments in Dockerfile:
      In your Dockerfile, use the ARG instruction to define environment variables based on the arguments passed during build:
      Dockerfile:
      ARG REACT_APP_NODE_ENV
      ARG REACT_APP_SERVER_BASE_URL
      ARG DB_HOST
      ARG DB_USERNAME
      # ... rest of your Dockerfile instructions
      ENV NODE_ENV $REACT_APP_NODE_ENV # Optional: Set additional environment variables
      Use code with caution.
      Accessing Secrets:
      Use the same syntax ({{ secrets.SECRET_NAME }}) within your --build-arg value to access secrets stored in your GitHub repository.

    • @IntegrationNinjas
      @IntegrationNinjas  8 месяцев назад

      You can also use AWS secrets manager as well and can use accordingly instead of using .env.

  • @Lost1nTranslation
    @Lost1nTranslation 9 дней назад

    Is it ok to whitelist all ip addresses?
    All zeros?

  • @rahulray7683
    @rahulray7683 9 месяцев назад +1

    Can you provide more video

  • @MohammedAmjadAliMK
    @MohammedAmjadAliMK 5 месяцев назад

    what about hosting frontend in vercel or netlify s so how we give nginx in backend

  • @teerthraj7311
    @teerthraj7311 9 месяцев назад +1

    I followed whole tutorial and deployed mern stack application
    I am getting ngnix error whenever i go to particular page and reload that page
    i go to website ->it runs fine
    i click on particular page-> it loads fine
    then if i reload that page page or i go that page directly that it shows nginix 404 not found error on particular page
    Any solution for that ???

    • @IntegrationNinjas
      @IntegrationNinjas  9 месяцев назад

      I am not able to get the exact error. Can you describe more based on this example if you are not able to see the same page.
      Few suggestions: Please check your nginx configuration with docker. If possible share here as well.

    • @BharatBhandari-s5i
      @BharatBhandari-s5i 9 месяцев назад

      @@IntegrationNinjas sir plz if you have time
      can i get in contact with you
      it will hardly take 10min

  • @Robennhood
    @Robennhood 2 месяца назад

    please make a task management project and api base project in react js node js

  • @lost_and_finding
    @lost_and_finding 8 месяцев назад +1

    Bro i have a similar kind of project but i am using postgressSql and prisma as orm can i follow the exact steps?

    • @IntegrationNinjas
      @IntegrationNinjas  8 месяцев назад

      Yes only thing you need to make sure your DB connection is established properly with postgres database server.

    • @lost_and_finding
      @lost_and_finding 8 месяцев назад

      @@IntegrationNinjas i am having problem in that actually i sm new in all these deployment. I tried to initiate the postgres and prisma commands in the yml file but it's not working and giving error. i am not sure how to proceed do i host the database separately or in the same ec2 instance where my backend or frontend will be hosted. can you please help me if you are not busy ?

  • @BharatBhandari-s5i
    @BharatBhandari-s5i 9 месяцев назад +1

    yes sir, please help us to solve this error
    I followed whole tutorial and deployed mern stack application
    I am getting ngnix error whenever i go to particular page and reload that page
    i go to website ->it runs fine
    i click on particular page-> it loads fine
    then if i reload that page page or i go that page directly that it shows nginix 404 not found error on particular page
    Any solution for that ???

    • @IntegrationNinjas
      @IntegrationNinjas  9 месяцев назад +1

      I am not able to get the exact error. Can you describe more based on this example if you are not able to see the same page.
      Few suggestions: Please check your nginx configuration with docker. If possible share here as well.

    • @SaiHarsha_shorts
      @SaiHarsha_shorts 7 месяцев назад

      Same error bro In details I should mention how connect u bro

  • @lost_and_finding
    @lost_and_finding 8 месяцев назад +1

    how to integrate nginx with backend deployment?

  • @canocan5050
    @canocan5050 6 месяцев назад +1

    I would like to use this project for my thesis.
    Is it fine with you, when I use this project for study purposes?

    • @IntegrationNinjas
      @IntegrationNinjas  6 месяцев назад +1

      Definitely, feel free to fork the repository.

    • @canocan5050
      @canocan5050 6 месяцев назад

      Thank you very much 🙏

    • @canocan5050
      @canocan5050 6 месяцев назад

      Is it easy to add monitoring and notification to this project so that you have a whole cicd pipeline in terms of DevOps? ​@@IntegrationNinjas​

    • @canocan5050
      @canocan5050 6 месяцев назад

      Is it easy to add monitoring and notification to this project to get a full DevOps cycle?@@IntegrationNinjas

    • @IntegrationNinjas
      @IntegrationNinjas  6 месяцев назад

      you can use AWS Cloudwatch to monitor logs, you can integrate notifications with GitHub Actions as well.

  • @johnmuchiriheytech
    @johnmuchiriheytech 9 месяцев назад +1

    how do you set up SSL certificate

    • @IntegrationNinjas
      @IntegrationNinjas  7 месяцев назад

      If you have the certificate files (certificate, private key, and any intermediate certificates), you'll need to configure your web server on the EC2 instance to use them. The specific steps for this will depend on the web server software you're using (e.g., Apache, Nginx).

  • @pkm1747
    @pkm1747 8 месяцев назад +1

    but i want hide port but how please explain

    • @IntegrationNinjas
      @IntegrationNinjas  8 месяцев назад

      Which port you want to hide?

    • @pkm1747
      @pkm1747 8 месяцев назад +1

      @@IntegrationNinjas 5173 and if 8000 also then it more better

  • @nikhilsolanki589
    @nikhilsolanki589 9 месяцев назад

    my app is successfully deployed but when i am running it on browser it says, This site can’t be reached

    • @onechandan
      @onechandan 9 месяцев назад +1

      Inbound rules, firewall settings

    • @IntegrationNinjas
      @IntegrationNinjas  9 месяцев назад

      Thanks@@onechandan for the information. Nikhil, please check the inbound rules make sure you have opened the port.

  • @augustgraymusic
    @augustgraymusic 2 месяца назад

    35:07 note

  • @rahulray7683
    @rahulray7683 9 месяцев назад +1

    Without Docker possible

    • @IntegrationNinjas
      @IntegrationNinjas  9 месяцев назад

      This is the easiest way to do with cicd. Otherwise you will need to setup few things like env file related configuration and nginx on server side. It can be achieved and there are multiple references on youtube for that so I haven’t went with that approach.

    • @rahulray7683
      @rahulray7683 9 месяцев назад +1

      @@IntegrationNinjas ohh Thnx

  • @FutureBeets
    @FutureBeets 7 месяцев назад +1

    Very helpful video