Sign inSign up

scalingo/mongo

By scalingo

•Updated over 4 years ago

Image of the MongoDB instances of Scalingo PaaS

Image
0

6.3K

scalingo/mongo repository overview

⁠Running the image

This image contains mongodb. To start the image, you can run the following snippet:

docker run -it -p 27017:27017 \
           -v <DATA_DIRECTORY>:/var/lib/mongodb \
           scalingo/mongo /mongo

You database is now up and running on the port 27017 of your host.

⁠Parameters

  • <DATA_DIRECTORY>: directory used to store database data.

⁠Environment

  • DB_USER (Optional, default: mongo): username used for database authentication.

  • DB_PASSWORD (Optional, default: secret): password used for database authentication.

  • DB_ADMIN_PASSWORD (Optional: default: admin-secret): password used for the admin account.

  • MONGO_WIRED_TIGER_CACHE_SIZE_MB: The size of the Wired tiger storage engine. Official documentation⁠

  • DB_UID (Optional, default: 1500): user UID that mongo should use to store data and run itself. You can set it to your own UID to have a simpler dev environment. Just add -e DB_UID=`id -u` before the -v flag.

⁠Permissions

A database with the same name as $DB_USER will be created, the user $DB_USER will be available to connect to it.

The admin user is named admin and can access any database with the password defined in $DB_ADMIN_PASSWORD and create new databases also.

To use the admin account on the user database, you should set the authentication source to admin. (ie: mongodb://user:[email protected]/user?authSource=admin)

⁠Startup logs

Normal startup logs are :

2016-06-13T08:01:36.612+0000 I FTDC     [initandlisten] Initializing full-time diagnostic data capture with directory '/var/lib/mongodb/diagnostic.data'
2016-06-13T08:01:36.612+0000 I NETWORK  [HostnameCanonicalizationWorker] Starting hostname canonicalization worker
2016-06-13T08:01:36.612+0000 I NETWORK  [initandlisten] waiting for connections on port 27017

Tag summary

Content type

Image

Digest

Size

162.7 MB

Last updated

over 4 years ago

docker pull scalingo/mongo