Thanks so much for this video, very clear and helpful. Do you know why a second volume is created which has a name that looks like a long id of some kind?
Awesome video. couple of q's. when u make a named volume, where is it located in case i wanted to back it up (guessing it may change between mac and windows). how much memory does your mac have. on windows, w/ wsl i mac out my 16gb, even w/ restricting resources
With named volumes, I'm not actually sure where they are, Docker handles all of it. However it sounds like you might want to not use a named volume, and instead give it a path directly to a folder on your pc. Something like this: -v C:/path/to/folder:/data/db This way instead of a volume managed by Docker, it's a folder directly on your host. I have 32GB of memory on this. It's pretty normal for me to be using around 25GB total, but I run a lot of stuff at once lol.
Where and how you deploy it depends on a few things (price, size, public facing, managed, etc), but I have an older video out that shows how to run a Postgres database on a Google Compute Engine VM. In that video I am showing postgres, and I'm using Docker Run (not compose), but the same general rules would apply. I haven't used it, but MongoDB Atlas in GCP is another option, but it's not using Docker.
@scriptbytes thank you. It's for a client of mine. Small app with not many impressions. Less than a thousand impressions a month. My docker compose image is using node and postgres images
How do I run TWO or more Micro-services (Spring boot + MongoDB) in a docker compose container ? I can not get my head around it, do I need two separate instance of MongoDB on two different ports?
If you need two different databases in the same docker compose, then I think they need to be on different ports. I haven't tested it yet, but I would think it would work. Maybe I'll do some testing and research and do a video on it.
I just ran a really really quick test. I created two different databases in my docker compose file, each with a unique port. I was able to connect to each of them. I think that should work for you. Good luck!
Are you getting any errors or info from the logs in the container? It will probably show if it's a wrong password or anything like that. One thing that's happened to me is having special characters in my password that the terminal didn't like. Thinks like \ / ' #, etc.
@@scriptbytes actually I had mongo installed before (locally) and the connection tried only the local one no matter the port , once I deleted the local one it worked great