configuration stuff
This commit is contained in:
parent
d2ab9e326c
commit
c883218ad4
2 changed files with 4 additions and 8 deletions
|
@ -9,9 +9,9 @@ services:
|
||||||
- mongodb_data:/data/db
|
- mongodb_data:/data/db
|
||||||
- ./init-scripts/init.js:/docker-entrypoint-initdb.d/mongo-init.js
|
- ./init-scripts/init.js:/docker-entrypoint-initdb.d/mongo-init.js
|
||||||
environment:
|
environment:
|
||||||
- MONGO_INITDB_DATABASE=mydb
|
- MONGO_INITDB_DATABASE=${DB_DATABASE}
|
||||||
- MONGO_INITDB_ROOT_USERNAME=${MONGO_INITDB_ROOT_USERNAME:-root}
|
- MONGO_INITDB_ROOT_USERNAME=${MONGO_INITDB_ROOT_USERNAME}
|
||||||
- MONGO_INITDB_ROOT_PASSWORD=${MONGO_INITDB_ROOT_PASSWORD:-root}
|
- MONGO_INITDB_ROOT_PASSWORD=${MONGO_INITDB_ROOT_PASSWORD}
|
||||||
platform: linux/arm64/v8
|
platform: linux/arm64/v8
|
||||||
volumes:
|
volumes:
|
||||||
mongodb_data:
|
mongodb_data:
|
|
@ -1,10 +1,6 @@
|
||||||
|
|
||||||
db = db.getSiblingDB('test');
|
|
||||||
|
|
||||||
db.createUser({
|
db.createUser({
|
||||||
user: "rank_user",
|
user: "rank_user",
|
||||||
pwd: "12345",
|
pwd: "12345",
|
||||||
roles: [{ role: "readWrite", db: "test" }]
|
roles: [{ role: "readWrite", db: "mydb" }]
|
||||||
});
|
});
|
||||||
|
|
||||||
db.createCollection('rank_crawler');
|
|
||||||
|
|
Loading…
Reference in a new issue