here is the docker file, after creating the docekr containe with command docker compose up
it's successfully runging the container, but I'm not able to connect with admin and pass to the mentioned database
in docker log I found that there we are missing user
version: '3.8'
services:
mongo:
image: mongo
hostname: mongodb-server
ports:
- "27017:27017"
restart: always
environment:
MONGO_INITDB_DATABASE: mydatabase
MONGO_INITDB_ROOT_USERNAME: admin
MONGO_INITDB_ROOT_PASSWORD: password
volumes:
- ./data/mongo/001_users.js:/docker-entrypoint-initdb.d/001_users.js:ro
- mongodb:/data/db
- mongodb_config:/data/configdb
volumes:
mongodb:
mongodb_config:
here is the docker file, after creating the docekr containe with command
docker compose upit's successfully runging the container, but I'm not able to connect with admin and pass to the mentioned database
in docker log I found that there we are missing user