How to dockerize NodeJS and MongoDB application using docker-compose

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

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

  • @chrisorescan2733
    @chrisorescan2733 2 года назад +12

    This was very thorough. After reading many tutorials about setting up Mongo for docker, this is the only one that actually worked. I'm now looking for more details on initializing Mongo database and roles, but this video has proven very useful.

  • @eL3M3nT4LisT
    @eL3M3nT4LisT Год назад

    You saved my life with docker and nodejs tech

  • @sammed.sankonatti
    @sammed.sankonatti 10 месяцев назад +2

    Crisp and clear explanation ✨. It Solved some of my doubts 🙌

  • @stevenjchang
    @stevenjchang 2 года назад +5

    WOW, you are SO GOOD at teaching! You really understand the balance of how to give a good pace, while stopping to give explanations when needed.
    Most coding tutorials don't understand the balance. They either explain every little thing, making the video super slow (and sometimes skipping an important explanation), or they just show a demo of them coding a project and don't explain anything.
    I felt like you explained everything I wanted to know, and skipped everything I didn't.

  • @nomanshahid667
    @nomanshahid667 2 года назад

    I was working on flask (python) restful api with mongodb and none of the flask + docker tutorials I watched had worked. I decided to give this one a go and it worked like a charm. Thank you so much

  • @paulnaija
    @paulnaija Год назад +1

    I was just at 9:54 mins before i subscribed to your channel.... You are very detailed and perfect at teaching... This was very helpful, Thank you.

  • @faysalahmed2619
    @faysalahmed2619 Год назад

    Thank you man, for providing such a clear and straightforward tutorial

  • @pasindushavinda4455
    @pasindushavinda4455 Год назад +1

    Really Informative Explenation !! Great JOB !! Thank You !! 👏

  • @vishal-shinde
    @vishal-shinde Год назад

    this was a great tutorial. I have my nodejs and mongo project which I wanted to dockerize. thanks!

  • @Cristutz00
    @Cristutz00 Год назад +3

    13:20 ci stands for Clean Install

  • @jonee4468
    @jonee4468 Год назад

    Thank you for creating such an informative and easy-to-understand video on Docker. I was confused about its use and how to learn it, but this video cleared up all my doubts. Keep up the great work! 😊

  • @usmanmughal5916
    @usmanmughal5916 3 года назад +5

    Make a video on kurbernetes load balancer with ingress ngnix react,node,database

  • @tatianalezhneva9100
    @tatianalezhneva9100 2 года назад +2

    You just saved another 2 hours of my life. Thanks!!!

  • @sinaukode
    @sinaukode 2 года назад +2

    Really big thanks to you, how you explain every concept is so nice

    • @mafiacodes
      @mafiacodes  2 года назад

      Thanks and welcome
      Subscribe like share

  • @divisorZero
    @divisorZero 10 месяцев назад

    Thank you, Bro! Very informative tutor! It helps me to start!

  • @aram5642
    @aram5642 3 года назад +3

    That is a heck of a good tutorial. I hope you will extend it by migrating api to typescript - then there will be an additional build step.

  • @vishwanathnijampurkar9862
    @vishwanathnijampurkar9862 Год назад

    Please make video on how to manage vulnerability errors

  • @theprocoder01
    @theprocoder01 2 года назад +1

    Amazing tutorial.
    The only tutorial which worked for me, many thanks. Keep it up

    • @mafiacodes
      @mafiacodes  2 года назад

      Glad to hear that
      Subscribe like share

  • @amir-ali8850
    @amir-ali8850 10 месяцев назад +1

    could you tell what themes and fonts you are using?

  • @paragbharadva6018
    @paragbharadva6018 2 года назад

    Explored very straight forward....
    Loved it.... ❤️

  • @codewithsub5083
    @codewithsub5083 2 года назад +2

    Your VS code configuration looks very good.
    Can you please share the configuration?
    Thank you

  • @vishwanathnijampurkar9862
    @vishwanathnijampurkar9862 Год назад +1

    great video pls keep making this kind of new videos

  • @TheJavituber
    @TheJavituber Год назад

    Gracias señor Hindú, me ayudó a salvar el semestre

  • @clamgts
    @clamgts 2 года назад +1

    Thank you, this tutorial was absolutely perfect.

  • @Asanka-tc3oh
    @Asanka-tc3oh 10 месяцев назад

    Thank you very much. very descriptive content

  • @AjaySharma-vz9ei
    @AjaySharma-vz9ei Год назад +1

    Thank you so much for this awesome Content 🙏🏻

  • @leiayuri
    @leiayuri 2 года назад

    Man, Thanks for that. It was really useful. Simple however straight to the important points.

  • @jonee4468
    @jonee4468 Год назад

    can you please make a tutorial on How to use the same Dockerfile for both local development and production with multi-stage builds?

  • @tiekkale
    @tiekkale 2 года назад +1

    Excellent Tutorial

  • @narekmusakhanyan523
    @narekmusakhanyan523 Год назад

    You did a great job, thank you!

  • @AminulislamSakib
    @AminulislamSakib Год назад +1

    Thank you. It was so helpful

  • @thongtranlequoc688
    @thongtranlequoc688 Год назад +1

    Thank you so much bro! Your video so good!

  • @userr4693
    @userr4693 2 года назад +1

    Thank you for making it easy

  • @important-topics2025
    @important-topics2025 2 года назад

    Please do a video on Microservices Node js

  • @kiranojha7820
    @kiranojha7820 2 года назад +1

    Amazing tutorial. Can you tell me the theme and font you're using? It's really pleasing for me

  • @important-topics2025
    @important-topics2025 2 года назад

    Great conceptual thank you so much sir

  • @shubhamdixit7909
    @shubhamdixit7909 Год назад

    This is a great one mahn!!

  • @andsyahr
    @andsyahr Год назад

    very nice, it help me a lot

  • @itsivar
    @itsivar 2 года назад

    Awesome video, well explained.
    Thanks!!

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

    You are the best thank you!

  • @digvijaysinghthakur2903
    @digvijaysinghthakur2903 2 года назад +2

    Can we add Mongodb Atlas URI in place of local MONGODB_URI in api service inside docker-compose but in that case I think we don't need mongodb service because now our database hosted on cloud. Am I right?

    • @mafiacodes
      @mafiacodes  2 года назад

      Yes 💯%

    • @abhiramsatpute
      @abhiramsatpute 2 года назад

      @@mafiacodes if possible PIN this comment as well, this doubt will come to many

    • @vinosamari
      @vinosamari 2 года назад

      @@abhiramsatpute There are still use cases for running locally so having the atlas url doesn't invalidate this method.

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

    Great video💯

  • @ShashankMPatil
    @ShashankMPatil Год назад

    If my database is in mongodb atlas, then what different steps should i follow......( like you changed localhost name to mongodb , so i am asking)

  • @souvik2930
    @souvik2930 Год назад

    If I have already a db in Mongodb atlas and I wanna use it inside container, then what would be the Mongo env variables. And where to mention that - docker-compose.yml or Dockerfile?

  • @Templestepscom
    @Templestepscom Год назад

    npm ci - ci stand for clean install

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

    Good content but i have problem, when i consult my api logs, i have that:
    > NODE_ENV=DEVELOPMENT nodemon app.js
    sh: nodemon: Permission denied

  • @techabl
    @techabl Год назад +1

    Great thanks 👍

  • @milon27
    @milon27 3 года назад +1

    please make a part 2 of it. deploy it on digital ocean Ubuntu server

    • @milon27
      @milon27 3 года назад +2

      part 3: show ci/cd using GitHub action

  • @subhashgn1775
    @subhashgn1775 2 года назад

    Great tutorial.👌👌

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

    Does no one getting error regarding circular depencies

  • @md.abuhusna9666
    @md.abuhusna9666 Год назад

    Would you please share the font family name you are using ?

  • @naveenkumarmurugan1962
    @naveenkumarmurugan1962 Год назад

    You are the best

  • @srinuannamneedi6458
    @srinuannamneedi6458 2 года назад

    I have cloned the repo and followed the steps as u mentioned , but getting this error " Mongoose connection is disconnected..."

  • @markopavlovic6066
    @markopavlovic6066 2 года назад

    Hello, i want my mongodb container to use data from local db how can i do that?

  • @replyishwor
    @replyishwor Год назад

    thank you brother

  • @lukachannel12
    @lukachannel12 2 года назад +1

    I followed the tutorial, however when I do "docker compose up", it gives me an error "MongooseError: The `uri` parameter to `openUri()` must be a string, got "undefined". It's like the environment varaiables I declared aren't being read properly. I'm using an .env file and it works fine when I run the app outside of a container. I searched online and found no solution. Any tips? Great video btw, helped me a lot, thanks!

    • @OneEyedGhost
      @OneEyedGhost 2 года назад

      Hey I am also doing the same and got the error before i added the env variables in the dockerfile. Hope it helps!!

    • @kiranojha8811
      @kiranojha8811 2 года назад

      you need to add env inside docker compose

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

    Thank you 🙏

  • @riteshthakur9250
    @riteshthakur9250 2 года назад

    Hii
    I am building a microservice in docker-compose and i want that if any service crashes then it should restart automatically. i used restart tag in compose file but it is not restarting if the service crashes. All of my services in node app. Can you please help me.

  • @swejalshrestha4744
    @swejalshrestha4744 2 года назад

    after docker compose up... my node server is working but there is problem in database connection

  • @AbdulAlim-zg8vt
    @AbdulAlim-zg8vt 2 года назад

    Can you please share the example files?

  • @kostaskaldis9285
    @kostaskaldis9285 2 года назад

    nodemon part is not working for my case

  • @jinnybat
    @jinnybat Год назад

    I cannot connect to mongoDb with db name or container name however it is getting created and connected with localhost only, am I missing something?

  • @yosepmys7605
    @yosepmys7605 2 года назад

    Thank you for your tutorial. I following yours, but I’m stuck with 404 status when I access localhost:4000. While status in terminal: nodejs-rest-api-api-1 | Mongodb connected....
    What should I do to find where error(s) came from? TIA.

    • @yosepmys7605
      @yosepmys7605 2 года назад

      So I clone the code from git, and there was different in app.js route. After I add get(‘/‘) it works! But why nodemon not working with yours? I add volumes to include node_modules and it works.

  • @suryavamsi5031
    @suryavamsi5031 Год назад

    Server started on port 3000...
    nodejs-rest-api-nodejs-1 | Mongoose connection is disconnected...
    nodejs-rest-api-nodejs-1 | Server selection timed out after 30000 ms
    nodejs-rest-api-nodejs-1 | Server selection timed out after 30000 ms,
    I'm getting this error, could any help me out...

  • @youmee8956
    @youmee8956 3 года назад

    Hello sir been waiting for your video so long. But im here just to remind you any plan to release new series of rock solid on how to avoid zero downtime when redeploy the app. don't mind me♥️😊

  • @VarunDeva23
    @VarunDeva23 2 года назад

    How to backup MongoDb database?
    For time being i want to backup my MongoDb data to my local pc from my Vps server which is digital Ocean droplet.
    After some time I'll create new droplet and restore the database.
    If it's the mysql then i can download .sql file from exporting Through phpmyadmin. Whenever i want i can import .sql file again
    Same thing how to do with docker? For MongoDb

  • @KaioRodrigues-nv9sp
    @KaioRodrigues-nv9sp 2 года назад +1

    Awesome !!11

  • @muhammadmursalin8915
    @muhammadmursalin8915 2 года назад +1

    Great 👍👌

  • @arvindnathrajesh255
    @arvindnathrajesh255 2 года назад

    crazy brother. u r god

  • @mirzabicer3896
    @mirzabicer3896 2 года назад

    Thank you

  • @hassanebendaoud4446
    @hassanebendaoud4446 2 года назад

    thanks

  • @harshyadav6097
    @harshyadav6097 Год назад +1

    best

  • @rbnby
    @rbnby 3 года назад

    I miss your android tutorial

  • @be_b_50_ankitkumar_singh79
    @be_b_50_ankitkumar_singh79 3 года назад

    Was needed

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

    throwing authentication error in mongosh

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

    😊

  • @ahmedhafez9951
    @ahmedhafez9951 Год назад

    ♥♥♥

  • @mufeezahmedmohammad9441
    @mufeezahmedmohammad9441 2 года назад

    Wow

  • @user-gi9oj9iz5r
    @user-gi9oj9iz5r 2 года назад

    For anyone getting an error 404 not found, add this above the const productRoute.... (it's not on the githubrepo)
    app.get('/', (req, res, next) => {
    res.json({ message:'It works .', env_name: process.env.NAME})
    })