Hello World

Be Happy!

mongodb quick start with docker


mkdir datadir        
docker run -d --rm --name some-mongo \
-v datadir:/data/db \
-p 27017:27017 \
-e MONGODB_USER="hello" -e MONGODB_DATABASE="hello_development" -e MONGODB_PASS="hellopassword" \
mongo
        
docker exec -it some-mongo bash
mongo
> show dbs
> use hello_development
> db.createUser(
        {
            user: "hello",
            pwd: "hellopassword",
            roles: [
                {
                    role: "readWrite",
                    db: "hello_development"
                }
            ]
        }
);

> db.posts.find

#mongodb (2) #docker (21)
List