Тёмный

How to Dockerize NodeJS application with MongoDB 

coder awesome
Подписаться 3,1 тыс.
Просмотров 9 тыс.
50% 1

Опубликовано:

 

14 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 30   
@anubhavkaul9710
@anubhavkaul9710 18 часов назад
I have some doubts, how the MongoDB data persisted? Is it automatic or we need to add any specific command or key in the files? Do we not loose data if we remove a container? Or does it happen when we delete the image of MongoDB?
@haiderjaafer8164
@haiderjaafer8164 Год назад
Great work... We didn't see your tutorials from long time.... What if database is sql server or mysq.... I think we need series tutorials on docker
@coderawesome
@coderawesome Год назад
Thanks a lot! Yes it’s been a while since the last video. I was too busy with my studies. Hopefully I can continue to upload more videos again. Thanks again for staying with the channel. ❤
@kunalrathor7114
@kunalrathor7114 23 дня назад
thanks 👍
@sudhansusingh1122
@sudhansusingh1122 3 месяца назад
Can I export the data of mongodb ,as I want to see it in my local system ?
@nikolanikolic7873
@nikolanikolic7873 2 месяца назад
Thank you a lot, but can i somehow see database that i created as a container?
@yashsaxena7016
@yashsaxena7016 2 месяца назад
yes you can enter in container by docker exec -it sh
@darshanpatil5226
@darshanpatil5226 8 месяцев назад
you did not expose 27017 port for MongoDB. how this can run without that??
@coderawesome
@coderawesome 8 месяцев назад
I'm glad you came up with this confusion. When you run containers, the containers are connected to a default bridge network. In this default bridge network, containers can communicate with each other, even if the ports are not explicitly exposed to the outside world. In your scenario, the Node.js application container and the MongoDB container are on the same default bridge network created by Docker Compose. Since they are on the same network, the Node.js container can reach the MongoDB container without needing to expose the MongoDB port (27017) to the host machine or the external network. Containers connected to the same bridge network can communicate with each other over their internal IP addresses or container names. Docker Compose automatically assigns a container name as a hostname that can be used for communication within the network. If you want to access the MongoDB container from outside (Eg: See the tables with Compass or any database client) the Docker network or from the host machine, you would need to expose the MongoDB port in the docker-compose.yml file. Hope that helps!
@Gopal-t7g
@Gopal-t7g 2 месяца назад
`docker-compose up` didn't work for me, so I tried `docker-compose up --build` and that resolved the issue.
@MohdAqib-b8g
@MohdAqib-b8g 2 месяца назад
why, we can't see data in compass? please i've spent whole for that?
@digenmore83
@digenmore83 8 месяцев назад
Can you pls make video on dockerize nodejs with postgresql/sql? Thank you.
@coderawesome
@coderawesome 8 месяцев назад
Yo check this out: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-LSt1af5YZcQ.html
@bikesbeersbeats
@bikesbeersbeats Год назад
Environment variables arent set correctly in the docker compose file. It should be in the format: KEY=value
@coderawesome
@coderawesome 9 месяцев назад
On the .env file yes.
@tanvisolanke964
@tanvisolanke964 Год назад
Im facing error in Post method that path title description and price is required even if i have passed it through a body
@coderawesome
@coderawesome 9 месяцев назад
Can you mention which part of the video you're facing the error ? (kindly mention the time)
@vitaminez85
@vitaminez85 Месяц назад
same error here ..
@sagar7929
@sagar7929 Год назад
Why volume is used? What if volumes is not used?
@coderawesome
@coderawesome Год назад
It's for persistent storage. When the container stops or destroyed, data shouldn't be destroyed right ? We use volumes for that.
@538sureshs7
@538sureshs7 3 месяца назад
Why everyone using docker compose instead of normal
@coderawesome
@coderawesome 3 месяца назад
What do you mean by normal ?
@538sureshs7
@538sureshs7 3 месяца назад
@@coderawesome manually running the docker container
@jinalkholiya8636
@jinalkholiya8636 5 месяцев назад
Thanks a lot
@coderawesome
@coderawesome 5 месяцев назад
Most welcome!!!
@Antonym-b5o
@Antonym-b5o 5 месяцев назад
I spent a lot of time for this. It's doesn't work without mongo:6.0-focal
@coderawesome
@coderawesome 5 месяцев назад
Official mongo image worked for me though.
@unsignd
@unsignd 3 месяца назад
thx!!
@coderawesome
@coderawesome 3 месяца назад
You’re welcome!
Далее
How to Run MongoDB in Docker
11:44
Просмотров 19 тыс.
А я с первого раза прошла (2024)
01:00
Connect Node to MongoDB with Docker and Docker Compose
15:02
Redis Crash Course
27:31
Просмотров 632 тыс.
The intro to Docker I wish I had when I started
18:27
Просмотров 155 тыс.
Dockerizing a simple Node.js application
12:45
Просмотров 10 тыс.
А я с первого раза прошла (2024)
01:00