Public Repository

Last pushed: 2 months ago
Short Description
Image of the MongoDB instances of Scalingo PaaS
Full Description

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:pass@my.mongo.host/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

cat: w: No such file or directory

Docker Pull Command
Owner
scalingo