Skip to content

Instantly share code, notes, and snippets.

@httpmurilo
Created June 7, 2020 13:03
Show Gist options
  • Save httpmurilo/9b6a8fa4140ef730fe56a3d1859a08c2 to your computer and use it in GitHub Desktop.
Save httpmurilo/9b6a8fa4140ef730fe56a3d1859a08c2 to your computer and use it in GitHub Desktop.
docker-compose-mongodb
version: '3'
services:
database:
image: 'mongo'
container_name: 'mongoDbDocker'
environment:
- MONGO_INITDB_DATABASE=demo
- MONGO_INITTB_ROOT_USERNAME=root
- MONGO_INITDB_RIIT_PASSWORD=root2020
volumes:
- ./init-mongo.js:/docker-entrypoint-initdb.d/init-mongo.js:ro
- ./mongo-volume:/data/db
ports:
- '27017-27019:27017-27019'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment