diff --git a/docker-compose.yml b/docker-compose.yml index b520f14d88..87041ef3a4 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1306,7 +1306,7 @@ services: mongosh -u root -p ${_APP_DB_ROOT_PASS} --authenticationDatabase admin --quiet --eval \" try { const hello = db.adminCommand({hello: 1}); - if (hello.isWritablePrimary) { + if (hello.isWritablePrimary && hello.setName === 'rs0') { quit(0); } } catch (e) {}