Created
April 2, 2022 06:55
-
-
Save rahul-yr/33ca676cc3a6f962944a3b9a01b6bc0f to your computer and use it in GitHub Desktop.
Docker compose file for Mongodb with UI
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.9' | |
services: | |
mongo: | |
container_name: myapp-mongo | |
image: mongo | |
restart: always | |
ports: | |
- "27017:27017" | |
environment: | |
MONGO_INITDB_ROOT_USERNAME: root | |
MONGO_INITDB_ROOT_PASSWORD: rahul | |
mongo-express: | |
image: mongo-express | |
restart: always | |
ports: | |
- 8081:8081 | |
environment: | |
ME_CONFIG_MONGODB_ADMINUSERNAME: root | |
ME_CONFIG_MONGODB_ADMINPASSWORD: rahul | |
ME_CONFIG_MONGODB_URL: mongodb://root:rahul@mongo:27017/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment