quarkusio / quarkus

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

Feature Request: Seamless Integration Between Quarkus Dev Services and Docker-Compose #39004

Open ennishol opened 4 months ago

ennishol commented 4 months ago

Description

Background I'm currently using MongoDB alongside Quarkus Dev Services for development purposes, which offers a smooth experience. When running packaged as jar dev services are not available, however. To work around this, I start the MongoDB instance via docker-compose. There are other scenarios where relying on docker-compose might be more advantageous.

I've created a jbang script and execute it as jbang-maven plugin to parse the docker-compose.yml file and extract the MongoDB image and container name. Based on whether the Docker image with the name is already running, it dynamically updates the application.properties file. This update either configures MongoDB with the correct connection string (thereby disabling Dev Services) or, if the image isn't running, ensures Dev Services are configured with the MongoDB version specified in the docker-compose.yml.

Feature Request It would be cool if Quarkus could natively support this functionality. Ideally, Quarkus would automatically detect whether MongoDB (or any specified service) is initiated via docker-compose or through its Dev Services.

Implementation ideas

No response

quarkus-bot[bot] commented 4 months ago

/cc @geoand (devservices), @maxandersen (jbang), @quarkusio/devtools (jbang), @stuartwdouglas (devservices)