-
-
Save tury3001/5d275a2260f0aeaa51c983698e7b25f2 to your computer and use it in GitHub Desktop.
Basic Mongo container for 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
MONGO_PORT=27017 | |
MONGO_ROOT_USERNAME=someuser | |
MONGO_ROOT_PASSWORD=somepassword |
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
{ | |
mongo: | |
image: mongo:latest | |
restart: always | |
env_file: ./.env | |
ports: | |
- $MONGO_PORT:$MONGO_PORT | |
environment: | |
MONGO_INITDB_ROOT_USERNAME: $MONGO_ROOT_USERNAME | |
MONGO_INITDB_ROOT_PASSWORD: $MONGO_ROOT_PASSWORD | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment