configuration stuff

This commit is contained in:
Kfir Dayan 2023-05-30 15:18:48 +03:00
parent d2ab9e326c
commit c883218ad4
2 changed files with 4 additions and 8 deletions

View file

@ -9,9 +9,9 @@ services:
- mongodb_data:/data/db
- ./init-scripts/init.js:/docker-entrypoint-initdb.d/mongo-init.js
environment:
- MONGO_INITDB_DATABASE=mydb
- MONGO_INITDB_ROOT_USERNAME=${MONGO_INITDB_ROOT_USERNAME:-root}
- MONGO_INITDB_ROOT_PASSWORD=${MONGO_INITDB_ROOT_PASSWORD:-root}
- MONGO_INITDB_DATABASE=${DB_DATABASE}
- MONGO_INITDB_ROOT_USERNAME=${MONGO_INITDB_ROOT_USERNAME}
- MONGO_INITDB_ROOT_PASSWORD=${MONGO_INITDB_ROOT_PASSWORD}
platform: linux/arm64/v8
volumes:
mongodb_data:

View file

@ -1,10 +1,6 @@
db = db.getSiblingDB('test');
db.createUser({
user: "rank_user",
pwd: "12345",
roles: [{ role: "readWrite", db: "test" }]
roles: [{ role: "readWrite", db: "mydb" }]
});
db.createCollection('rank_crawler');