Skip to content

Instantly share code, notes, and snippets.

@taksenov
Forked from ashblue/docker-compose.mongo.yml
Created September 6, 2019 09:48
Show Gist options
  • Save taksenov/278ea731807881ce1525f7a295eeb6b7 to your computer and use it in GitHub Desktop.
Save taksenov/278ea731807881ce1525f7a295eeb6b7 to your computer and use it in GitHub Desktop.
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:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment