In /opt/zw-vmmc-docker/mongo you need to create mongo-init.js:
Create file:
Code Block vim /opt/zw-vmmc-docker/mongo/mongo-init.js
And paste the next lines:
Code Block //mongo Init db.createUser( { user: "<user>", pwd: "<pwd>", mechanisms: ["SCRAM-SHA-1"], roles: [ { role: "readWrite", db: "prod" }, { role: "readWrite", db: "dev" }, { role: "dbAdmin", db: "dev" }, { role: "dbAdmin", db: "prod" } ] } );
You will need to replace “<user>” and “<pwd>” with the user and password existing here: mongo-user // TODO
You will also need to download backups log-backup.gz and prod-backup.gz, whichyou will find here(repo or MongoDB Atlas). And paste in /opt/zw-vmmc-docker/mongo/backups // TODO
About the Mongo configuration, we will finish the configuration when we focus on the docker-compose.yml file.
...