-
Notifications
You must be signed in to change notification settings - Fork 34
Setting up MongoDB with Docker
Pablo Ojanguren edited this page Mar 20, 2017
·
1 revision
In this page you can know how to run a docker image of MongoDB to be used with SwellRT.
MongoDB files can be stored in the host machine. We will put them at /var/local/lib/swellrt-demo/db
sh docker run --name demo-swellrt-mongo -v /var/local/lib/swellrt-demo/db:/data/db -d mongo
Then you must edit config/application.conf
and configure SwellRT to use that mongodb server.
mongodb_host = demo-swellrt-mongo
Finally, exec the run the SwellRT docker image command with the --link demo-swellrt-mongo:mongo
option
See what instances are running
docker ps
Get the IP address of the instance
docker inspect <name>
Run mongo command with the IP
mongo --host <ip>
Texts and images of the SwellRT Wiki are released as open content, under the Creative Commons Attribution 4.0 International.