Skip to content

Instantly share code, notes, and snippets.

@kyrcha kyrcha/README.md
Last active Aug 21, 2018

Embed
What would you like to do?
Spin mongodb with mongo express using docker compose

Accessible from the web: http://hostname:8081 through mongo-express and you can connect with a mongodb client like robo 3T in hostname:27017.

To run:

 docker-compose -f mongo.yml up
version: '3.6'
services:
mongo:
image: mongo
container_name: npm-miner-mongo
restart: always
volumes:
- /data/npm-miner/mongodb:/data/db
ports:
- 27017:27017
environment:
MONGO_INITDB_ROOT_USERNAME: ${ME_CONFIG_MONGODB_ADMINUSERNAME}
MONGO_INITDB_ROOT_PASSWORD: ${ME_CONFIG_MONGODB_ADMINPASSWORD}
mongo-express:
image: mongo-express
container_name: npm-miner-me
restart: always
ports:
- 8081:8081
environment:
ME_CONFIG_MONGODB_ADMINUSERNAME: ${ME_CONFIG_MONGODB_ADMINUSERNAME}
ME_CONFIG_MONGODB_ADMINPASSWORD: ${ME_CONFIG_MONGODB_ADMINPASSWORD}
ME_CONFIG_BASICAUTH_USERNAME: ${ME_CONFIG_BASICAUTH_USERNAME}
ME_CONFIG_BASICAUTH_PASSWORD: ${ME_CONFIG_BASICAUTH_PASSWORD}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.