Skip to content

Commit

Permalink
Update init-mongo.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
cyri113 authored Jan 4, 2024
1 parent 0a1ff85 commit 71c0cbd
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions init-mongo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,4 @@ mongosh -- "$MONGO_INITDB_DATABASE" <<EOF
var rootUser = '$MONGO_INITDB_ROOT_USERNAME';
var rootPassword = '$MONGO_INITDB_ROOT_PASSWORD';
db.createUser({user: rootUser, pwd: rootPassword, roles: ["readWrite"]});
# REPLICA SET
var config = {
"_id": "rs0",
"version": 1,
"members": [
{
"_id": 1,
"host": "mongodb-dev:27017",
"priority": 1
},
]
};
rs.initiate(config, { force: true })
rs.status()
EOF

0 comments on commit 71c0cbd

Please sign in to comment.