Skip to content

Instantly share code, notes, and snippets.

@marisancans
Last active January 25, 2021 11:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marisancans/9c661b06e174f9eb7a80520f526cf55c to your computer and use it in GitHub Desktop.
Save marisancans/9c661b06e174f9eb7a80520f526cf55c to your computer and use it in GitHub Desktop.
Docker compose mongo express
version: "3.7"
services:
mongodb:
container_name: mongo-tasker-container
image: mongo
restart: always
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: example
MONGO_DATABASE: automata_db
MONGO_USER: user
MONGO_PASSWORD: password
ports:
- 27017:27017
volumes:
- ./mongodb/mongodbdata:/data/db
- ./mongodb/initdb.d/:/docker-entrypoint-initdb.d
mongo-express:
container_name: mongo-express-tasker-container
image: mongo-express
restart: always
depends_on:
- mongodb
ports:
- 881:8081
environment:
ME_CONFIG_MONGODB_ADMINUSERNAME: root
ME_CONFIG_MONGODB_ADMINPASSWORD: example
ME_CONFIG_MONGODB_SERVER: mongodb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment