From 72e7c1e07d9c98c734a09292fed325c406998691 Mon Sep 17 00:00:00 2001 From: Kevin Koech Date: Mon, 5 Feb 2024 07:28:32 +0300 Subject: [PATCH] Use env vars for dbInit.js --- contrib/docker/scripts/dbInit.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/docker/scripts/dbInit.js b/contrib/docker/scripts/dbInit.js index d77bbfde5..e19c39b4a 100755 --- a/contrib/docker/scripts/dbInit.js +++ b/contrib/docker/scripts/dbInit.js @@ -13,7 +13,7 @@ rs.initiate(config, { force: true }); rs.status(); db.createUser({ - user: "root", - pwd: "rootpassword", + user: process.env.MONGO_INITDB_ROOT_USERNAME || "root", + pwd: process.env.MONGO_INITDB_ROOT_PASSWORD || "rootpassword", roles: [{ role: "root", db: "admin" }], });