mirror of
https://github.com/vimagick/dockerfiles.git
synced 2024-11-28 09:08:50 +02:00
709 B
709 B
mongo
MongoDB is an open-source, document database designed for ease of development and scaling.
up and running
$ pwgen -1 8 1
Aedahwa7
$ docker-compose up -d
$ docker-compose cp mongo:/usr/bin/mongo /usr/local/bin/
$ mongo mongodb://root:root@localhost:27017/admin
>>> use mydb
>>> db.createUser({user: 'myuser', pwd: 'Aedahwa7', roles: [{role: 'readWrite', db: 'mydb'}]})
>>> exit
$ mongo mongodb://myuser:Aedahwa7@localhost:27017/mydb
>>> show collections
>>> exit