quarkusio / quarkus

Quarkus: Supersonic Subatomic Java.
https://quarkus.io
Apache License 2.0
13.84k stars 2.7k forks source link

Add MongoDB Compass to the DevService / DevUI #41247

Open Inithron opened 5 months ago

Inithron commented 5 months ago

Description

The MongoDB client extension provides the possibility to start a MongoDB container when running tests or in dev mod. It would be great it the extension would also provide a GUI like MongoDB Compass for the database.

Implementation ideas

Create a MongoDB Compass image, start it together with the MongoDB and add a link to the GUI in the DevUI

quarkus-bot[bot] commented 5 months ago

/cc @cescoffier (devui), @geoand (devservices), @loicmathieu (mongodb), @phillip-kruger (devui), @stuartwdouglas (devservices)

Inithron commented 4 months ago

Hi, Can I have a short feedback, if this is something you will implement, or if it is for some reasons not possible?

loicmathieu commented 4 months ago

Hi, Even if it can be handy, I'm not sure we already have this kind of feature anywhere in Quarkus. And the main question is, would you be eager to propose a PR to implement this? As I don't think someone else would want to implement and maintain this.

@geoand, maybe you have some thoughts about this?

geoand commented 4 months ago

I think it's a good idea. We do have something similar in various extensions (the LGTM stack for example adds this, the quarkus-mailpit is anothe example I can think of)

elizarazo1 commented 3 months ago

Why not just use compass? If you fix the dev services port on application.properties e.g quarkus.mongodb.devservices.port=27017 then you can use a connection string similar to mongodb://127.0.0.1:27017/?directConnection=true&serverSelectionTimeoutMS=2000&appName=mongosh+2.2.5 on compass, if in doubt on what your connection string is you can get it directly by running mongosh on your terminal whilst the container is running

Inithron commented 1 month ago

@elizarazo1 this is how we do it currently. But there are other extensions like the Kafka extension which provides a GUI to see the amount of topics, messages, etc. There are also 3rd party tools wich do exactly the same. But it is more convenient just use the integrated GUI. The same applies for Compass. Instead of starting an additional tool it would be more convenient if the GUI would be integrated in the DevUI.