Addons Docs

Mongodb

MongoDB is a cross-platform document-oriented database. Classified as a NoSQL database program, MongoDB uses JSON-like documents with optional schemas. https://www.mongodb.com/

This addon provides a mongo instance with user, password, and database name access.

IMPORTANT: persistentpath should NOT be changed. Also, make sure to set MAXBUILDDURATION to at least 100: openode set-config MAXBUILD_DURATION 100.

See sample Node.js connecting to the Mongodb addon: https://github.com/openode-io/kb/blob/master/mongodb/nodejs-connect.md

Default configs:

See the repository for the configurations definition.

{

  "name": "mongodb",

  "category": "database",

  "minimum_memory_mb": 100,

  "logo_filename": "logo.svg",

  "documentation_filename": "README.md",

  "image": "mongo",

  "requires_persistence": true,

  "persistent_path": "/data/db",

  "required_fields": ["persistent_path"],

  "ports": [

    {

      "target_port": 27017,

      "protocol": "TCP"

    }

  ],

  "env_variables": {

    "MONGO_INITDB_ROOT_USERNAME": "root",

    "MONGO_INITDB_ROOT_PASSWORD": "123456",

    "MONGO_INITDB_DATABASE": "mydb"

  },

  "required_env_variables": [

    "MONGO_INITDB_ROOT_USERNAME",

    "MONGO_INITDB_ROOT_PASSWORD",

    "MONGO_INITDB_DATABASE"

  ]

}