Sign inSign up

osshelp/mongodb-schema

By osshelp

Updated over 1 year ago

One-shot container for creating MongoDB databases and users.

Image
1

2.1K

osshelp/mongodb-schema repository overview

Description

One-shot container for creating MongoDB databases and users.

Deploy examples

Docker Compose
  mongodb-schema:
    image: osshelp/mongodb-schema:stable
    restart: "no"
    environment:
      MONGODB_HOST: mongodb
      MONGODB_USER: root
      MONGODB_PASSWORD: $MONGODB_PASSWORD
      MONGODB_DBS: "DB1_NAME:$USER1_PASSWORD, DB2_NAME:$USER2_PASSWORD"
    networks:
      - net
Docker swarm
  mongodb-schema:
    image: osshelp/mongodb-schema:stable
    deploy:
      restart_policy:
        condition: none
    environment:
      MONGODB_HOST: mongodb
      MONGODB_USER: root
      MONGODB_PASSWORD: $MONGODB_PASSWORD
      MONGODB_DBS: "DB1_NAME:$USER1_PASSWORD, DB2_NAME:$USER2_PASSWORD"
    networks:
      - net

Parameters

SettingDefaultDescription
MONGODB_HOSTmongodbMongoDB host
MONGODB_PORT27017MongoDB port
MONGODB_USERrootMongoDB superuser
MONGODB_PASSWORDpasswordMongoDB superuser password
MONGODB_TIMEOUT60Timeout in seconds for wating MongoDB host connection
MONGODB_DBS-List of DB_NAME:PASSWORD (delimiter: space or comma. USERNAME is equal to DBNAME)

Sources

Source repository is available at Github here.

License

GPL3

Author

OSSHelp Team, see https://oss.help

Tag summary

Content type

Image

Digest

sha256:a67e4fcf8

Size

159.9 MB

Last updated

over 1 year ago

docker pull osshelp/mongodb-schema