Skip to content

Instantly share code, notes, and snippets.

@SarasaGunawardhana
Created July 10, 2019 09:00
Show Gist options
  • Save SarasaGunawardhana/623e5a09f87c04eb00cdb97e69bbab5b to your computer and use it in GitHub Desktop.
Save SarasaGunawardhana/623e5a09f87c04eb00cdb97e69bbab5b to your computer and use it in GitHub Desktop.
docker-compose.yml file for mongodb which expose port
#Sarasa Gunawardhana
version: "3.2"
services:
database:
image: mongodb:latest
environment:
- MONGO_DATA_DIR=/data/db
- MONGO_LOG_DIR=/dev/null
volumes:
- /data/db:/data/db
ports:
- "27017:27017"
command: mongod --smallfiles --logpath=/dev/null # --quiet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment