Skip to content

Instantly share code, notes, and snippets.

@ashblue
Created January 6, 2018 23:31
Docker Compose example for MongoDB databases. Includes named volume support.
version: '3'
services:
mongodb:
image: mongo:3.6.1
container_name: uv-mongodb
volumes:
- mongodb:/data/db
- mongodb_config:/data/configdb
ports:
- 27017:27017
command: mongod
volumes:
mongodb:
mongodb_config:
@taksenov
Copy link

taksenov commented Sep 6, 2019

Very useful for me. Tnx!

@thearabbit
Copy link

I base on Mac, Mongo4.x.
I can't find folder mongodb , mongodb _config???

@sudomopoy
Copy link

thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment