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 0654d28 commit f919ba6
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions init-mongo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,18 @@ mongosh -- "$MONGO_INITDB_DATABASE" <<EOF
db.createUser({user: rootUser, pwd: rootPassword, roles: ["readWrite"]});
# REPLICA SET
var config = {
"_id": "dbrs",
"version": 1,
"members": [
{
"_id": 1,
"host": "mongodb-dev:27017",
"priority": 1
},
]
};
# var config = {
# "_id": "dbrs",
# "version": 1,
# "members": [
# {
# "_id": 1,
# "host": "mongodb-dev:27017",
# "priority": 1
# },
# ]
# };
rs.initiate(config, { force: true })
rs.status()
# rs.initiate(config, { force: true })
# rs.status()
EOF

0 comments on commit f919ba6

Please sign in to comment.