Skip to content

Latest commit

 

History

History

mongo-as-docker-container

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Deploy mongo as docker container with examples

This folder contains several ways how to deploy and use mongo database as docker container (sources). Examples include basic shell script and docker-compose approach. Both have advantates and disadvantages. It depends on your requirements to pick up the right way to operate it. The tutorial is part of my tutorials collection. Hope it helps.

The examples include:

  • running mongo db in authenticated mode
  • creating admin user, aplication user, backup user
  • persistent storage
  • dump and restore scripts (via docker container!)
  • running mongo-express gui
  • local vs prod docker compose files
  • health check

Prerequisities

  • Docker installed.
  • make tool for convenience (optional, very likely your linux already has it installed)
  • Examples were tested on Ubuntu Linux

Table of contents

  1. Run mongo docker container via shell script.
  2. Run mongo docker container via docker-compose.yml.

Support

Feel free to ask question via Issues. PR are welcomed. Please leave a feedback.