Created
December 5, 2020 01:58
-
-
Save pedroricardo/5fa6a1119be79de3ea8741bdedc30503 to your computer and use it in GitHub Desktop.
Iniciando um Banco de dados MongoDB em um container Docker
This file contains 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' | |
services: | |
mongodb_container: | |
image: mongo:latest | |
container_name: 'MeuDB' | |
restart: always # iniciar com o servidor | |
environment: | |
#MONGO_INITDB_DATABASE: namebanco | |
MONGO_INITDB_ROOT_USERNAME: usuario | |
MONGO_INITDB_ROOT_PASSWORD: senha | |
ports: | |
- 27017:27017 | |
volumes: | |
- /home/data/db:/data/db |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment