How to run MongoDB and Mongo-express with docker-compose?

前端 未结 8 2121
情话喂你
情话喂你 2021-02-14 07:10

I try to run MongoDB and Mongo-express by Docker-compose. I use following config:

version: \'3\'

services:
    mongo:
        image: mongo
        environment:
         


        
8条回答
  •  清酒与你
    2021-02-14 08:00

    Mongo-express changed the user and pass ENV keywords:

    OLD:

    - ME_CONFIG_MONGODB_AUTH_USERNAME=${MONGO_ROOT_USER}
    - ME_CONFIG_MONGODB_AUTH_PASSWORD=${MONGO_ROOT_PASSWORD}
    

    NEW:

     - ME_CONFIG_MONGODB_ADMINUSERNAME=${MONGO_ROOT_USER}
     - ME_CONFIG_MONGODB_ADMINPASSWORD=${MONGO_ROOT_PASSWORD}
    

    reference: https://hub.docker.com/_/mongo-express

提交回复
热议问题