Skip to content

Instantly share code, notes, and snippets.

@thekingofbandit
Forked from crazyoptimist/compose.yaml
Created July 27, 2021 08:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thekingofbandit/78aec7842932dbcb43d65eabf034962a to your computer and use it in GitHub Desktop.
Save thekingofbandit/78aec7842932dbcb43d65eabf034962a to your computer and use it in GitHub Desktop.
MongoDB Docker Deployment
version: "3.1"
services:
mongodb:
container_name: mongo
image: mongo
volumes:
- ./db_data/:/data/db/
ports:
- 27017:27017
restart: always
environment:
MONGO_INITDB_ROOT_USERNAME: your_username
MONGO_INITDB_ROOT_PASSWORD: your_strong_password
command: --quiet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment