Skip to content

Instantly share code, notes, and snippets.

@piotrlewandowski
Created August 1, 2022 15:08
Show Gist options
  • Save piotrlewandowski/881e7797d8be50f7e4ad9ed3c3078c5a to your computer and use it in GitHub Desktop.
Save piotrlewandowski/881e7797d8be50f7e4ad9ed3c3078c5a to your computer and use it in GitHub Desktop.
MongoDB running on a Docker container
version: "3.9"
services:
mongodb:
image : mongo
container_name: mongodb
environment:
- MONGO_INITDB_ROOT_USERNAME=username
- MONGO_INITDB_ROOT_PASSWORD=password
volumes:
- .docker/mongodb/database:/data/db
ports:
- 27017:27017
restart: unless-stopped
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment