From 6bb5404f87c70317047816ab5f7af8651d86edae Mon Sep 17 00:00:00 2001 From: ayham291 Date: Sun, 14 Dec 2025 23:58:08 +0100 Subject: [PATCH] fix(mongo): use appName instead of localhost for replica set localhost doesn't work properly in containers --- packages/server/src/utils/databases/mongo.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/server/src/utils/databases/mongo.ts b/packages/server/src/utils/databases/mongo.ts index 9cb8a69f4..556878fe2 100644 --- a/packages/server/src/utils/databases/mongo.ts +++ b/packages/server/src/utils/databases/mongo.ts @@ -54,7 +54,7 @@ if [ "$REPLICA_STATUS" != "1" ]; then mongosh --eval ' rs.initiate({ _id: "rs0", - members: [{ _id: 0, host: "localhost:27017", priority: 1 }] + members: [{ _id: 0, host: "${appName}:27017", priority: 1 }] }); // Wait for the replica set to initialize