Public | Automated Build

Last pushed: 2 years ago
Short Description
Short description is empty for this repo.
Full Description

curlapp/docker-mongod

Base docker image to run a MongoDB database server node.

Usage

To create the image curlapp/mongod, execute the following command on the docker-mongod folder:

    docker build -t curlapp/mongod .

What's in this image?

This is an image that contains the following:

  • MongoDB server packages
  • Mongo Management Service (MMS) Monitoring Agent

Look at the changelog on this page for actual MongoDB and MMS monitoring agent versions inside the image.

Configuration

This image is created to ease configuration as much as possible. There are 3 volumes that must
be configured for this image to work:

  • /data/conf - This volume must point to a folder that contains the configuration files.
  • /data/log - This volume must point to the location for log files.
  • /data/db - This volume must point to the location for data files.

This image is configured to start the mongod deamon by reading the configuration file named
"/data/conf/mongod.conf". Make sure you create such file in the root of /data/conf volume.

An example mongod.conf file:

    systemLog:
      destination: file
      path: "/data/log/mongod.log"
      logAppend: true

    storage:
      dbPath: "/data/db"
      engine: "wiredTiger"
      journal: 
        enabled: true

Please make sure that:

  • logs and data go to folders that are mapped as volumes
  • mongod is NOT configured to run as deamon

In order to use MMS Monitoring agent, just include the configuration file named "monitoring-agent.config"
in the root of the /data/conf volume. An example of such file:

    #
    # Enter your API key  - See: https://mms.mongodb.com/settings
    #
    mmsApiKey=<API KEY GOES HERE>

    #
    # Hostname of the MMS monitoring web server.
    #
    mmsBaseUrl=https://mms.mongodb.com

    # For additional optional settings, please see
    # https://mms.mongodb.com/help/reference/monitoring-agent

The MMS Monitoring Agent will be automatically started after MongoDB Server process if the configuration
file is present. Agent logs will go to the /data/log volume.

Timezone

Please, don't forget to set the right timezone for this image. The easiest way of doing this is to mount
the docker host machine /etc/localtime to /etc/localtime inside the container. Just add the following to
your docker run/create command line:

    --volume="/etc/localtime:/etc/localtime:ro"

Syslog forwarding

To simplify things in our everyday operations, we forward almost all logs to a central syslog server. This image contains
a very simple script that will forward all logs to syslog if desired. To make use of this facilty, you need to set three
environment variables:

  • SYSLOG_FORWARD : set to "true" to enable syslog forwarding
  • SYSLOG_HOST : the IP address or hostname of the syslog server
  • SYSLOG_PORT : the port of the syslog server

Additional information

For more customisation information please check out the phusion/baseimage documentation.

Changelog

3.0.3.1 (release date: 2015-06-06)

  • MongoDB 3.0.3
  • MMS Monitoring Agent 3.4.0.190

3.0.2.1 (release date: 2015-04-29)

  • initial release
  • MongoDB 3.0.2
  • MMS Monitoring Agent 3.3.0.183
Docker Pull Command
Owner
curlservices
Source Repository

Comments (0)