Containerizing a MERN Stack Application and Deploying using Docker Compose | Step by Step Guide

Поделиться
HTML-код
  • Опубликовано: 29 сен 2024
  • Support my work
    www.buymeacoff...
    GitHub repo for the Project
    github.com/iam...
    In the video, we will learn how to containerize a MERN stack application and create a Docker Compose file for running multiple container along with the networking in one simple step. A step by step guide is provided in the GitHub repo shared above.
    MERN is one of several variations of the MEAN stack (MongoDB, Express, Angular, Node), where the traditional Angular.js front-end framework is replaced with React.js. Other variants include MEVN (MongoDB, Express, Vue, Node), and really any front-end JavaScript framework.
    Have any questions while learning ? Don't worry, Join our Doubts Clearing Group.
    Join our Doubts Clearing Group
    / @abhishekveeramalla
    Here are some more very useful Zero to Hero playlists on the channel.
    - Free DevOps Playlist: • DEVOPS ZERO TO HERO CO...
    - AWS Zero to Hero Playlist: • AWS Zero to Hero - AWS...
    - Terraform Zero to Hero Playlist: • Terraform Zero to Hero
    - Python for DevOps Playlist: • Python for DevOps
    About me:
    ========
    Instagram: / abhishekveeramalla_off...
    Telegram Channel : t.me/abhishekv...
    LinkedIn: / abhishek-veeramalla
    GitHub: github.com/iam...
    Medium: / abhishekveeramalla-av
    Disclaimer: Unauthorized copying, reproduction, or distribution of this video content, in whole or in part, is strictly prohibited. Any attempt to upload, share, or use this content for commercial or non-commercial purposes without explicit permission from the owner will be subject to legal action. All rights reserved.

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

  • @AbhishekVeeramalla
    @AbhishekVeeramalla  29 дней назад +3

    GitHub repo for the Project (refer compose branch for learning)
    github.com/iam-veeramalla/MERN-docker-compose

    • @AbhishekPandeySunny
      @AbhishekPandeySunny 16 часов назад

      Hi AV - you may want to include how to setup a local environment to run the app before starting to write the dockerfile for both frontend and backend apps. Setting up the right connection string for Mongo DB access is tricky job here. Thanks.

  • @praveenkore842
    @praveenkore842 29 дней назад +1

    Awesome as expected ❤

  • @mehedihasanridoy1086
    @mehedihasanridoy1086 6 дней назад

    How to do it in github actions? What about environment variables which needed for the backend?

  • @nousheensafoora206
    @nousheensafoora206 14 дней назад

    frontend container is running but i am unable to connect frontend container from localhost
    i mapped port5173 to ec2
    what is the issue

    • @kgCode658
      @kgCode658 7 дней назад

      Same issue. Did you solve it?

  • @kunaljain5266
    @kunaljain5266 28 дней назад

    Hello @Abhishek, Thanks for making such good contents on DevOps tools. I have used docker playground for creating all the docker containers.
    However, I am able to create all the containers fine, But after clicking the Save Employee Records I am still not getting the details.
    I have followed every step and all the 3 containers are running fine in the same network "mern" that was created.
    Can you please help me if anything I am missing ?
    Thanks

    • @AbhishekVeeramalla
      @AbhishekVeeramalla  28 дней назад

      Please open the developer console as shown in the video and see what are you missing ?
      I have also shared the docker compose file for your reference in the compose branch. Please use that.

    • @kunaljain5266
      @kunaljain5266 28 дней назад

      @@AbhishekVeeramalla Failed to load resource: net::ERR_CONNECTION_REFUSED
      Getting this error..
      I have used the provided compose branch and ran the docker compose up command... But unable to save the employee details

    • @senpaihere6512
      @senpaihere6512 26 дней назад

      @@kunaljain5266 so did you find a solution?

    • @kunaljain5266
      @kunaljain5266 26 дней назад

      @@senpaihere6512 Nope.. I redeployed it and same issue.. everything runs fine but when click on save employee details it's not showing up.
      Are you facing the same ??

    • @senpaihere6512
      @senpaihere6512 26 дней назад

      @@kunaljain5266 yep, it's probably related to cors

  • @Madhu9738
    @Madhu9738 29 дней назад +1

    First one to comment

  • @Just_be_there
    @Just_be_there 29 дней назад +6

    Why are you prove everything wrong?When we became skills that did not match the current market...
    Yes, I'm Abhishek is here to provide free...No problem gohead🙌🙌

  • @bharathidesu6668
    @bharathidesu6668 9 дней назад +2

    50min passes just in 5 min ! simple clear explanation

  • @simranbanwait
    @simranbanwait 29 дней назад +4

    Mad respect for the effort of making whole setup,
    You're doing great work sir, keep it up.

  • @soumyadipchatterjee2267
    @soumyadipchatterjee2267 28 дней назад +2

    When I walkthrough your project by doing things not listening the entire videos ,its really feels amazed 😊❤.

  • @harshgupta399
    @harshgupta399 Час назад

    bro in ur git repo readme
    docker run --network=demo --name mongodb -d -p 27017:27017 -v ~/opt/data:/data/db mongodb:latest
    commands seems wrong it should be mongo:latest not mongodb:latest

  • @hehehe4206
    @hehehe4206 29 дней назад +1

    Hi anna, why do we need to port map mondb , both backend and db are running in same network , and we need not to host data base to the world right??

  • @jayalathak3976
    @jayalathak3976 28 дней назад +1

    Your really a good teacher sir...❤.... Thank you so much for ur valuable lessons

  • @jitinkumar835
    @jitinkumar835 29 дней назад +1

    Best learning content is here

  • @ramsep17
    @ramsep17 28 дней назад +1

    Hi @Abhishek, i followed your video but there seems to be a problem. with database volumes. i was trying this in ubuntu in gcp. i have followed the instructions but when i create a user it just shows empty record. not sure if i have to configure the volume differently.. before connecting it to database it wouldnt even reload the page when i click on save employee record. but after connecting, it looks like its saving but its not displaying any output. if anyone has the same issue. if you found the solution. please let me know..

    • @AbhishekVeeramalla
      @AbhishekVeeramalla  28 дней назад +2

      You need to create a Docker volume and mount the volume to the DB or you need to bind mount, I think its normal communicated exactly in the video.
      But you can see in the Docker Compose I have a step for volume.
      Can you run “docker-compose up -d” , I think it should work and you should have the app running.

    • @ramsep17
      @ramsep17 28 дней назад +1

      Thank you Abhishek for the prompt response. I might have missed it. Will check again and try it. Thanks again. Great work. I follow all of your videos.

  • @msatyamounika
    @msatyamounika 25 дней назад

    Hi Abhishek, a query. In your repo, I see that there is a separate field named "environment" in docker-compose.yml. At what kind of scenarios do we need to use it?

  • @Kk-rl7nv
    @Kk-rl7nv 28 дней назад

    Hi Abhishek,
    Thanks for the video, could help to create a zero to hero series on Hashicorp vault , we got many video like install configure using but many concepts which needs a final touch from you like injecting and types of injecting credentials on Kubernetes pod from kv2 and also covered dynamic injecting secrets from vault to RDS/ ec2 ets and on Kubernetes it getting the secret automatically😊

  • @ankitsarkar7377
    @ankitsarkar7377 26 дней назад

    Hello Abhishek, I have tried to deploy the app into GCP env but somehow the mongodb is not able to save and show the user details can you please help in this issue?😊

  • @sagarbirla2879
    @sagarbirla2879 18 дней назад

    Hi Abhishek I made this project's frontend with distroless image

  • @venugopal-nc3nz
    @venugopal-nc3nz 28 дней назад

    Hi Abhishek, Can you deploy flask application using docker . I mean can you make one video

  • @Raghu_Devops_Aspirant
    @Raghu_Devops_Aspirant 28 дней назад +1

    Thank you so much, @Abhishek.Veeramalla , for your incredible efforts and generosity in sharing your knowledge with us. Your explanations are clear, concise, and extremely helpful. You make complex topics easier to understand, and it's clear how passionate you are about helping others succeed. Keep up the amazing work-you're making a real difference for so many of us!

  • @gudamahendar6992
    @gudamahendar6992 27 дней назад

    Abhishek include grafana and Prometheus in project

  • @naitiksinghal4378
    @naitiksinghal4378 28 дней назад +1

    w content

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

    abhishek garu.....i need to give interview soon....i would like to have interview questions for aws devops engineer from you....plz share

  • @sangativamsikrishna1691
    @sangativamsikrishna1691 28 дней назад

    Thanks Abhishek, such an amazing explantion with basics to end flow. Thank you

  • @Dilip-nx2sj
    @Dilip-nx2sj 29 дней назад +1

    First comment

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

    what changes would be needed for distroless images here? Thanks for the amazing content!

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

    This is one of the videos I've been waiting for since I started following your channel❤

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

    sir please create one more devopsified project with complete details like env secret

  • @AswinAswin-i7t
    @AswinAswin-i7t 29 дней назад

    pls upload more videos for azure related contents

  • @chandugummoji7504
    @chandugummoji7504 28 дней назад

    Thank you very much, Abhishek

  • @Imran_kpk
    @Imran_kpk 28 дней назад

    very very helpful thanks dear

  • @okunniyigbenga1259
    @okunniyigbenga1259 29 дней назад +1

    ❤ From Nigeria 🇳🇬

  • @sravandatha9511
    @sravandatha9511 28 дней назад

    Check the node version

  • @babllu4604
    @babllu4604 29 дней назад +1

    😊

  • @AayushSinha-d1c
    @AayushSinha-d1c 23 дня назад

    Thank you, sir, for the brilliant explanation! 🙏. I’m running into a bit of trouble-my container is running smoothly during deployment, but I am getting a 'Site can't be reached' error. Any assistance would be greatly appreciated!

    • @mouni-o-
      @mouni-o- 20 дней назад

      if you are using aws ec2 then security groups ports so open for ssh(port number) or all alltraffic

  • @snehasish-bhuin
    @snehasish-bhuin 28 дней назад

    Lovely content ❤

  • @S.Ajju1214
    @S.Ajju1214 29 дней назад

    Awesome ❤

  • @prasantkumar1986
    @prasantkumar1986 17 дней назад

    Thanks you so much @Abhishek.Veeramalla . Successfully implemented MERN stack app

  • @Imran_kpk
    @Imran_kpk 28 дней назад

    which urls l will be change that exists in codes or please mention which urls will be change i have change and create manifests also work but when i add employ then data not print in UI reman all things frontend backend and mongo access

    • @Sundharesan.P
      @Sundharesan.P 24 дня назад +1

      same issue happend to me it seems frontend cant able to communicate with backend

    • @Imran_kpk
      @Imran_kpk 24 дня назад

      @@Sundharesan.P may be the endpoint issues api url of backend and frontend

  • @shabarimeda4970
    @shabarimeda4970 29 дней назад +2

    Hi Abhishek anna very helpful video and rare content on RUclips. Hat's off anna. Thank you so much.
    Please do videos on how to push images to Azure container registry or Elastic container registry using GitHub actions and deploy on a Vm.
    Because many startups won't use kubernetes.
    Thanks anna.

  • @vasd8706
    @vasd8706 28 дней назад

    Anyone getting the below error, when trying to run the container for frontend?
    > client@0.1.0 dev
    > vite --host 0.0.0.0
    ✘ [ERROR] Cannot start service: Host version "0.19.12" does not match binary version "0.21.5"
    1 error
    failed to load config from /app/vite.config.js
    Error: The service was stopped
    at /app/node_modules/esbuild/lib/main.js:1084:25
    at responseCallbacks. (/app/node_modules/esbuild/lib/main.js:704:9)
    at Socket.afterClose (/app/node_modules/esbuild/lib/main.js:694:28)
    at Socket.emit (node:events:525:35)
    at endReadableNT (node:internal/streams/readable:1359:12)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)

    • @sayantanmanna1360
      @sayantanmanna1360 26 дней назад

      I think it happens because you are copying the node_modules from your local to the container. Create a .dockerignore file inside frontend and add node_modules/ to it . Build a fresh image and it should work.

  • @devdomain1498
    @devdomain1498 27 дней назад

    Love it