Mongo

This is the area where you will quide you to use storage Mongo

Default Configuration

linux network
Figure 1. mongo network

More info here: mongo replication

Working Directory

/

Default user

root

Directory Map

You can find it in Hybrid: Instances  More  Connect  Directory Maps

Ports

You can find it in Hybrid: Instances  More  Ports

Logs

You can find it in Hybrid: Instances  More  Logs

Connect

Connect Info in Hybrid: Instances  More  Connect  Open a terminal and Run

Connect via SSH

Connect via exec

Open a terminal and Run:

docker exec -it swarmlabmongo1 /bin/sh

Default Configuration

Port

  27017

Root Username

  swarmlab

Root Password

  swarmlab

Database

 app_swarmlab

Database Usename

 app_swarmlab

Database Password

 app_swarmlab

ReplicaSet

 rs0

Test it!

Commands inside container
MONGO_INITDB_ROOT_USERNAME=swarmlab
MONGO_INITDB_ROOT_PASSWORD=swarmlab
MONGO_INITDB_DATABASE=app_swarmlab
MONGO_INITDB_USERNAME=app_swarmlab
MONGO_INITDB_PASSWORD=app_swarmlab
MONGO_REPLICA_SET_NAME=rs0

mongo "mongodb://localhost:30001,localhost:30002,localhost:30003/$MONGO_INITDB_DATABASE" -u $MONGO_INITDB_USERNAME
mongo "mongodb://localhost:30001,localhost:30002,localhost:30003/app_swarmlab" -u app_swarmlab

or

connect and run

mongo
Commands inside container

Video

Start mongo

Learn how to start mongo

Stop mongo

Learn how to stop mongo