Public | Automated Build

Last pushed: a year ago
Short Description
mongodb
Full Description

Mongo docker

Based off the normal "mongo" container.

  • USE_AUTH - (default false) - if present, will enable auth for mongo

  • VAULT_TOKEN - if present, tells the script to pull credentials (MONGO_PASSWORD and MONGO_ROOT_PASSWORD) from vault

  • VAULT_URL - required if using VAULT_TOKEN

  • MONGO_USER - Required if using vault. Otherwise, if present the script will try to create root & app user accounts.

  • MONGO_DATABASE - Required if using vault. If specifying MONGO_USER directly, then this is required.

  • MONGO_PASSWORD - If using vault, will be filled in automatically. If specifying MONGO_USER directly, then this is required.

  • MONGO_ROOT_PASSWORD - If using vault, will be filled in automatically. If specifying MONGO_USER directly, then this is required.

  • REPLICA_SET - If present, this will be used as the replica set name when starting mongo.

NOTE: The Vault secret should have the following keys

  • MONGO_ROOT_PASSWORD - the password for the "root" mongodb user
  • MONGO_PASSWORD - the password for the app mongodb user (ie. MONGO_USER)

Examples

Mongo will be started with no auth:

  • (no env vars)

Mongo will be started with auth:

  • USE_AUTH=1

Mongo will be started with auth, and automatically create the root/app user accounts:

  • USE_AUTH=1
  • MONGO_DATABASE=...
  • MONGO_USER=...
  • MONGO_PASSWORD=...
  • MONGO_ROOT_PASSWORD=...

Mongo will be started with auth, download credentials from vault, and automatically create the root/app user accounts:

  • USE_AUTH=1
  • VAULT_TOKEN=...
  • VAULT_URL=...
  • MONGO_USER=...
  • MONGO_DATABASE=...
Docker Pull Command
Owner
owlabs

Comments (0)