Skip to content

Instantly share code, notes, and snippets.

@rahul-yr
Created April 2, 2022 06:55
Show Gist options
  • Save rahul-yr/33ca676cc3a6f962944a3b9a01b6bc0f to your computer and use it in GitHub Desktop.
Save rahul-yr/33ca676cc3a6f962944a3b9a01b6bc0f to your computer and use it in GitHub Desktop.
Docker compose file for Mongodb with UI
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