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.
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!
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🙌🙌
I remember you mentioning the network of the backend container and db container should be isolated from the frontend container when you talked about docker networking. On the contrary here we are using the same network for all three containers...but what happens if the frontend container is compromised?
Hi Abhishek, I am following this course. Thanks a ton! 1. At 28:41 you are not building an image for mongo instead running the container on mongodb:latest. For frontend and backend image is built and container is run. Why not for mongo or db? 2. Also, I tried the example but if I give localhost:port it is not working for me. What is that I am missing? 3. In real time scenario, how will we debug the Dockerfiles / the dockercompose.yaml
Abhishek, Same here why you have not created a docker file for the mongo DB and you haven't created a volume for DB how are you using in docker run -v @lakshmielumalai4125, 2. localhost:port is not working check if the port are already used in any other service or if you are using ec2 instance, make the necessary changes in security groups like enabling the port number.
Abhishek, 28:41 here why you have not created a docker file for the mongo DB and you haven't created a volume for DB how are you using in docker run -v, please explain, Thanks..
@@TamilTipsAbdur , mangodb:latest image exists in a public or private Docker registry accessible to Docker, it will be pulled automatically and run this container
Hi Abhishek I am saving employee record then it's showing empty when it goes to next page can you please tell me why ? My front end and back end container are communicating I checked it .
@@Sahil_00369 The issue is because the react application calls the api from the browser. In the code, the api URLs are configured as localhost. In this demo, Abishek has used docker desktop to run the container which will automatically resolve localhost to 127.0.0.1 (loop back ip address). In case, 1. you are running docker in docker desktop in windows replace localhost to 127.0.0.1 ./mern/frontend/src/components/RecordList.jsx: const response = await fetch(`127.0.0.1:5050/record/`); ./mern/frontend/src/components/RecordList.jsx: await fetch(`127.0.0.1:5050/record/${id}`, { ./mern/frontend/src/components/Record.jsx: `127.0.0.1:5050/record/${params.id.toString()}` ./mern/frontend/src/components/Record.jsx: response = await fetch("127.0.0.1:5050/record", { ./mern/frontend/src/components/Record.jsx: response = await fetch(`127.0.0.1:5050/record/${params.id} 2. If you are running your docker in an EC2 instance or Azure VM, replace localhost to public IPof your VM. Also in security group expose port 5050 inbound for all ips. ./mern/frontend/src/components/RecordList.jsx: const response = await fetch(`:5050/record/`); ./mern/frontend/src/components/RecordList.jsx: await fetch(`:5050/record/${id}`, { ./mern/frontend/src/components/Record.jsx: `:5050/record/${params.id.toString()}` ./mern/frontend/src/components/Record.jsx: response = await fetch("9:5050/record", { ./mern/frontend/src/components/Record.jsx: response = await fetch(`:5050/record/${params.id} 3. IIf you are running docker in vmware or virtual box, replace the localhost to vmware or virtualbox host IP address
I have a problem that my localhost:3000 stuck at loading after run “sudo docker logs front-end”. Do you know what is the cause and Can you please give me some solutions? Thank you so much for your amazing video ❤
so... you mapped the port 5173 of the container to 3000 and you're facing the problem? Please give more context to replicate the issue... because if its your local system you're using to do this, its different and if its EC2 from aws or any VM from other cloud provider, you need to check the inbound rules.
If i try in aws linux its not working frontend i can access backend or database i can’t access but I tried in local it’s working … what should i do in aws Linux
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?😊
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!
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?
When ever you want to store any environment variables like PORT=5050, or evern any environment variables which will be used by the code can be stored there.
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
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..
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.
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.
Hi @ramsep17, Is it working properly for you after using docker compose.yml ??? Me also facing same kind of issue..after deploying with docker compose also...records are not getting saved....Not sure .what went wrong..🙂↕️
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😊
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
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.
@@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 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 ??
Hey Abhishek, amazing tutorial. I was wondering if we have to run % docker compose up -d --build command if we want to make changes to the files to use for our own project?
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.
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)
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.
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
GitHub repo for the Project (refer compose branch for learning)
github.com/iam-veeramalla/MERN-docker-compose
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.
Love how at #19min you solve all my dockerfile queries in less than a minute. Really appreciate you explaining from scratch.
❤️
50min passes just in 5 min ! simple clear explanation
❤️
100%😍
When I walkthrough your project by doing things not listening the entire videos ,its really feels amazed 😊❤.
Mad respect for the effort of making whole setup,
You're doing great work sir, keep it up.
Thank you very much!
Your really a good teacher sir...❤.... Thank you so much for ur valuable lessons
Beautiful explanation! Very easy to follow and was able to containerize my app
Amazing ❤️
This is one of the videos I've been waiting for since I started following your channel❤
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!
Best learning content is here
Awesome as expected ❤
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??
Thanks Abhishek, such an amazing explantion with basics to end flow. Thank you
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🙌🙌
Thanks
@@AbhishekVeeramallais the ansible series done?
I remember you mentioning the network of the backend container and db container should be isolated from the frontend container when you talked about docker networking. On the contrary here we are using the same network for all three containers...but what happens if the frontend container is compromised?
Awesome ❤
Hi Abhishek, I am following this course. Thanks a ton!
1. At 28:41 you are not building an image for mongo instead running the container on mongodb:latest. For frontend and backend image is built and container is run. Why not for mongo or db?
2. Also, I tried the example but if I give localhost:port it is not working for me. What is that I am missing?
3. In real time scenario, how will we debug the Dockerfiles / the dockercompose.yaml
Abhishek, Same here why you have not created a docker file for the mongo DB and you haven't created a volume for DB how are you using in docker run -v
@lakshmielumalai4125,
2. localhost:port is not working check if the port are already used in any other service or if you are using ec2 instance, make the necessary changes in security groups like enabling the port number.
Lovely content ❤
Abhishek, 28:41 here why you have not created a docker file for the mongo DB and you haven't created a volume for DB how are you using in docker run -v, please explain, Thanks..
Did you found?bro
I think its like docker hello world he is running mongodb directly without any dockerfile
@@TamilTipsAbdur , mangodb:latest image exists in a public or private Docker registry accessible to Docker, it will be pulled automatically and run this container
Thank you very much, Abhishek
very very helpful thanks dear
what changes would be needed for distroless images here? Thanks for the amazing content!
nice
Hi Abhishek I am saving employee record then it's showing empty when it goes to next page can you please tell me why ? My front end and back end container are communicating I checked it .
same here, if anyone solved the issue please do comment
@@Sahil_00369 The issue is because the react application calls the api from the browser. In the code, the api URLs are configured as localhost. In this demo, Abishek has used docker desktop to run the container which will automatically resolve localhost to 127.0.0.1 (loop back ip address).
In case,
1. you are running docker in docker desktop in windows replace localhost to 127.0.0.1
./mern/frontend/src/components/RecordList.jsx: const response = await fetch(`127.0.0.1:5050/record/`);
./mern/frontend/src/components/RecordList.jsx: await fetch(`127.0.0.1:5050/record/${id}`, {
./mern/frontend/src/components/Record.jsx: `127.0.0.1:5050/record/${params.id.toString()}`
./mern/frontend/src/components/Record.jsx: response = await fetch("127.0.0.1:5050/record", {
./mern/frontend/src/components/Record.jsx: response = await fetch(`127.0.0.1:5050/record/${params.id}
2. If you are running your docker in an EC2 instance or Azure VM, replace localhost to public IPof your VM. Also in security group expose port 5050 inbound for all ips.
./mern/frontend/src/components/RecordList.jsx: const response = await fetch(`:5050/record/`);
./mern/frontend/src/components/RecordList.jsx: await fetch(`:5050/record/${id}`, {
./mern/frontend/src/components/Record.jsx: `:5050/record/${params.id.toString()}`
./mern/frontend/src/components/Record.jsx: response = await fetch("9:5050/record", {
./mern/frontend/src/components/Record.jsx: response = await fetch(`:5050/record/${params.id}
3. IIf you are running docker in vmware or virtual box, replace the localhost to vmware or virtualbox host IP address
Same here : on inspect elements getting warning as “failed to load resource:could not connect to server .
I have a problem that my localhost:3000 stuck at loading after run “sudo docker logs front-end”. Do you know what is the cause and Can you please give me some solutions? Thank you so much for your amazing video ❤
so... you mapped the port 5173 of the container to 3000 and you're facing the problem? Please give more context to replicate the issue... because if its your local system you're using to do this, its different and if its EC2 from aws or any VM from other cloud provider, you need to check the inbound rules.
@@sivach8667 Thank you for your kind reply! However, I've already resolved it ❤.
w content
😊
Hope you will enjoy the demo
If i try in aws linux its not working frontend i can access backend or database i can’t access but I tried in local it’s working … what should i do in aws Linux
Hi abhisek,
There is an issue with the application code in handling cors i guess.
How to do it in github actions? What about environment variables which needed for the backend?
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?😊
Hi Abhisek,
Can this be implemented on EC2 t2.micro?
If not what configuration type should I use?
I don't think so
You can implement this setup in EC2 t2.micro, infact in any EC2 instance or Azure VM with docker and docker compose installed
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!
if you are using aws ec2 then security groups ports so open for ssh(port number) or all alltraffic
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?
When ever you want to store any environment variables like PORT=5050, or evern any environment variables which will be used by the code can be stored there.
Thanks you so much @Abhishek.Veeramalla . Successfully implemented MERN stack app
@AbhishekVeeramalla Even after giving the inbound rules in ec2, unable to access local hosts 5173, 27017,5050. Couldn’t find why
Please do it in local machine if you have like windows, ubuntu or else it will not work. CORS problem.
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
same issue happend to me it seems frontend cant able to communicate with backend
@@Sundharesan.P may be the endpoint issues api url of backend and frontend
Hi Abhishek I made this project's frontend with distroless image
frontend container is running but i am unable to connect frontend container from localhost
i mapped port5173 to ec2
what is the issue
yh same here
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..
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.
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.
Hi @ramsep17,
Is it working properly for you after using docker compose.yml ??? Me also facing same kind of issue..after deploying with docker compose also...records are not getting saved....Not sure .what went wrong..🙂↕️
@@srinu1099 I was not able to troubleshoot this..
@@ramsep17 application networking, some issue with the CORS configuration...
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😊
❤ From Nigeria 🇳🇬
Thanks
sir please create one more devopsified project with complete details like env secret
Hi Abhishek, Can you deploy flask application using docker . I mean can you make one video
can I showcase this project in my resume?
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
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.
@@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
@@kunaljain5266 so did you find a solution?
@@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 ??
@@kunaljain5266 yep, it's probably related to cors
☑
Check the node version
First one to comment
Hope you will enjoy the demo
@@AbhishekVeeramalla yes definitely
pls upload more videos for azure related contents
abhishek garu.....i need to give interview soon....i would like to have interview questions for aws devops engineer from you....plz share
Abhishek include grafana and Prometheus in project
First comment
Thanks
Love it
Hey Abhishek, amazing tutorial.
I was wondering if we have to run
% docker compose up -d --build
command if we want to make changes to the files to use for our own project?
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.
Noted
done
11/1/25
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)
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.
@AbhishekVeeramalla Even after giving the inbound rules in ec2, unable to access local hosts 5173, 27017,5050. Couldn’t find why
@@SoothingMusic2k23 why would you expose your backend and database to world, you can use HTTP://public-ip:5173 for frontend
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