Last active
January 25, 2021 11:43
-
-
Save marisancans/9c661b06e174f9eb7a80520f526cf55c to your computer and use it in GitHub Desktop.
Docker compose mongo express
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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