version: ‘3’
services:
mongodb:
image: mongo
container_name: mongodb
ports:
– 27017:27017
environment:
MONGO_INITDB_ROOT_USERNAME: admin
MONGO_INITDB_ROOT_PASSWORD: mypassword
# volumes:
# – ./database-data:/data/db
mongo-express:
image: mongo-express
container_name: mongo-express
ports:
– 8081:8081
environment:
ME_CONFIG_MONGODB_ADMINUSERNAME: admin
ME_CONFIG_MONGODB_ADMINPASSWORD: mypassword
ME_CONFIG_MONGODB_SERVER: mongodb
links:
– mongodb:mongo
depends_on:
– mongodb
This is .yml configuration file. Why it showing username and password again and again when i try to login in mongo-express ?
Ashu Mishra is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.