Created
September 23, 2014 08:39
-
-
Save StephanieSunshine/2d8918d991491003e555 to your computer and use it in GitHub Desktop.
Steps to build plug many locomotives into one mongo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker run -d --name mongodb dockerfile/mongodb mongod --noprealloc --smallfiles --rest --httpinterface | |
# use nsenter to enter it and find it's ip using 'ip addr' | |
### For future notes | |
### docker run -p 127.0.0.01:804:80 --link=mongodb:27017 --link=mongodb:28017 -d -e MONGODB_PORT_27017_TCP_ADDR="172.17.0.2" metakungfu/locomotive-cms | |
docker run -p 127.0.0.01:801:80 --link=mongodb:27017 --link=mongodb:28017 -d metakungfu/locomotive-cms | |
docker run -p 127.0.0.01:802:80 --link=mongodb:27017 --link=mongodb:28017 -d metakungfu/locomotive-cms | |
docker run -p 127.0.0.01:803:80 --link=mongodb:27017 --link=mongodb:28017 -d metakungfu/locomotive-cms | |
# Enter each one: | |
apt-get install -y vim | |
# Edit each file | |
vim /opt/locomotive_cms/app/config/mongoid.yml | |
# Make sure the database names are always unique and then change the ip of each database server to the ip noted above | |
# Then use haproxy to do name based reverse proxy rules and you are all set. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment