Created
August 1, 2022 15:08
-
-
Save piotrlewandowski/881e7797d8be50f7e4ad9ed3c3078c5a to your computer and use it in GitHub Desktop.
MongoDB running on a Docker container
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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