feat: initiate mongo replset by default

Signed-off-by: Zomatree <me@zomatree.live>
This commit is contained in:
Zomatree
2026-03-29 05:37:43 +01:00
parent f181edc8f2
commit d9643ebd8d
5 changed files with 27 additions and 3 deletions

5
scripts/mongo-init.js Normal file
View File

@@ -0,0 +1,5 @@
try {
rs.status();
} catch (e) {
rs.initiate({ _id: "rs0", members: [{ _id: 0, host: "localhost:27017" }] });
}