From 6d0b723d9d654834e54a89d02ebd4b0fd06b3a1f Mon Sep 17 00:00:00 2001 From: Cristiano Nicolai <570894+cristianonicolai@users.noreply.github.com> Date: Tue, 23 Jul 2024 17:54:56 +1000 Subject: [PATCH] Use generated hostname when shared network is enabled --- .../mongodb/deployment/DevServicesMongoProcessor.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/extensions/mongodb-client/deployment/src/main/java/io/quarkus/mongodb/deployment/DevServicesMongoProcessor.java b/extensions/mongodb-client/deployment/src/main/java/io/quarkus/mongodb/deployment/DevServicesMongoProcessor.java index 710f60fe8554f..c8506b9511233 100644 --- a/extensions/mongodb-client/deployment/src/main/java/io/quarkus/mongodb/deployment/DevServicesMongoProcessor.java +++ b/extensions/mongodb-client/deployment/src/main/java/io/quarkus/mongodb/deployment/DevServicesMongoProcessor.java @@ -313,5 +313,10 @@ public String getReplicaSetUrl(String databaseName) { return super.getReplicaSetUrl(databaseName); } } + + @Override + public String getHost() { + return useSharedNetwork ? hostName : super.getHost(); + } } }