Skip to content

Instantly share code, notes, and snippets.

@sajanjswl
Created February 15, 2020 19:52
Show Gist options
  • Save sajanjswl/8fcefaaaeb8f6ba59787d34df2375f03 to your computer and use it in GitHub Desktop.
Save sajanjswl/8fcefaaaeb8f6ba59787d34df2375f03 to your computer and use it in GitHub Desktop.
compose file for MongoDb and Mong-express
version: '3.1'
volumes:
mongoData:
networks:
mongo_net:
driver: bridge
services:
mongo:
image: mongo
container_name: mongoDb
restart: always
environment:
MONGO_INITDB_ROOT_USERNAME: admin
MONGO_INITDB_ROOT_PASSWORD: pass
volumes:
- mongoData:/data/db
networks:
- mongo_net
ports:
- 27017:27017
mongo-express:
image: mongo-express
container_name: mongo-express
restart: always
environment:
ME_CONFIG_MONGODB_ADMINUSERNAME: admin
ME_CONFIG_MONGODB_ADMINPASSWORD: pass
networks:
- mongo_net
ports:
- 8081:8081
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment