version: '3.8' services: mongo: image: mongo:5.0.3 ports: - "27017:27017" # to connect from my laptop environment: MONGO_INITDB_ROOT_USERNAME: root MONGO_INITDB_ROOT_PASSWORD: example