Skip to content

Instantly share code, notes, and snippets.

@BruceZu
Last active April 7, 2018 20:36
Show Gist options
  • Save BruceZu/6054cc22ad8a298999013f3edee14330 to your computer and use it in GitHub Desktop.
Save BruceZu/6054cc22ad8a298999013f3edee14330 to your computer and use it in GitHub Desktop.
Mongo replset in docker. Python access and verify Mongo replset.
mongo replica set 3.4.4 local docker engine (bridge)
@BruceZu
Copy link
Author

BruceZu commented May 27, 2017

connect mongo arbiter in docker

$ docker exec -it forticloudplatform_mongo_1    mongo mongodb://forticloudplatform_mongo_arbiter_1

run python from local 'worker' Docker container

$ docker exec -it $(docker ps | grep worker | cut -d" " -f 1) python

find out all place where the code need update: configuration and code

(.venv) bzu@bruce-laptop:~/project/FortiCloudPlatform$ grep -Rr "MONGODB" .  --exclude-dir=".venv" --exclude-dir=".idea" --exclude-dir=".git"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment