Created
January 9, 2025 14:15
-
-
Save h4ck4life/086364fdbb073a601748317bd3e712dd to your computer and use it in GitHub Desktop.
Mongodb docker compose
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.8' | |
services: | |
mongodb: | |
image: mongo:7.0 | |
container_name: mongodb | |
environment: | |
- MONGO_INITDB_ROOT_USERNAME=mongo | |
- MONGO_INITDB_ROOT_PASSWORD=mongo | |
- MONGO_INITDB_DATABASE=mongodb | |
volumes: | |
- mongodb_data:/data/db | |
networks: | |
- nginxmanager_default | |
restart: always | |
volumes: | |
mongodb_data: | |
name: mongodb_data | |
networks: | |
nginxmanager_default: | |
external: true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment