switching back to mongo 5
parent
5de21610de
commit
b0a34ce379
@ -0,0 +1,26 @@
|
||||
echo "**********************************************"
|
||||
echo "Waiting for startup.."
|
||||
sleep 15
|
||||
echo "done"
|
||||
|
||||
echo SETUP.sh time now: `date +"%T" `
|
||||
|
||||
mongo --host mongo:27017 -u ${MONGO_INITDB_ROOT_USERNAME} -p ${MONGO_INITDB_ROOT_PASSWORD} <<EOF
|
||||
|
||||
var cfg = {
|
||||
"_id": "rs0",
|
||||
"protocolVersion": 1,
|
||||
"version": 1,
|
||||
"members": [
|
||||
{
|
||||
"_id": 0,
|
||||
"host": "mongo:27017",
|
||||
"priority": 2
|
||||
}
|
||||
]
|
||||
};
|
||||
rs.initiate(cfg, { force: true });
|
||||
rs.secondaryOk();
|
||||
db.getMongo().setReadPref('primary');
|
||||
rs.status();
|
||||
EOF
|
Loading…
Reference in New Issue