Skip to content

Instantly share code, notes, and snippets.

@akagaeng
Last active May 31, 2020 08:15
Show Gist options
  • Save akagaeng/71427b952a894588d758164be3e44f6a to your computer and use it in GitHub Desktop.
Save akagaeng/71427b952a894588d758164be3e44f6a to your computer and use it in GitHub Desktop.
Run mongodb and mongo-express with docker (docker-compose)
# docker-compose up -f mongo.yaml
version: '3.1'
services:
mongo:
image: mongo
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: root
# restart: always
container_name: mongo
ports:
- 27017:27017
mongo-express:
image: mongo-express
# restart: always
container_name: mongo-express
environment:
ME_CONFIG_MONGODB_ADMINUSERNAME: root
ME_CONFIG_MONGODB_ADMINPASSWORD: root
ports:
- 8081:8081
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment