-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Node/Mongo docker-compose's mongoDB container should be available to the local host #506
Comments
Another option to think about is to add the MongoDB extension to the devcontainer. That way the user can browse and manage the DB even without tools installed locally on their machine. If Codespaces eventually supports compose, this would also be helpful there as the extension is available in the in-browser editor. |
Can you be more specific? To be clear, MongoDB is in a separate container, so localhost inside the web container won't work on any platform if that is what you are referring to. It's like having two machines sitting next to each other.
That's a good point -I'd tend to prefer this option rather than exposing a port by default without the developer knowing about it. The container will also fail to start if the port is in use.
It actually does today! |
I have clearly missed the memo. This is great news! |
Port forwarding works - I didn't see it in the .devcontainer.json file - can it be added but commented out? Along with the note that it can be done temporarily from the command bar? |
Yep, I added it into the devcontainer.json when you raised your earlier issue since it actually was supposed to be there. It's in pretty much every other definition - so it, just got missed here for some reason. Can also review extensions to see if there's one to include by default. Database ones have lower usage numbers but the Azure DB extension does support straight mongo as well. Need to think through that a bit. |
Should be resolved with #509 |
The mongo container should be available externally or at least give me the commented out docker-compose settings. This dev container is supposed to help me debug but isn't helpful if I can't see what eventually gets in the DB.
The container should also work for windows/linux/mac. Windows is picky about the host for a mongo container.
The text was updated successfully, but these errors were encountered: