title: How to run MongoDB and Mongo-express with docker-compose?
body: <p>I try to run MongoDB and Mongo-express by Docker-compose. I use following config:</p>
  
  <pre><code>version: '3'
  
  services:
      mongo:
          image: mongo
          environment:
              - MONGO_INITDB_ROOT_USERNAME=${MONGO_ROOT_USER}
              - MONGO_INITDB_ROOT_PASSWORD=${MONGO_ROOT_PASSWORD}
              - MONGO_INITDB_DATABASE=project
      mongo-express:
          image: mongo-express
          environment:
              - ME_CONFIG_MONGODB_SERVER=mongo
              - ME_CONFIG_MONGODB_PORT=27017
              - ME_CONFIG_MONGODB_ENABLE_ADMIN=false
              - ME_CONFIG_MONGODB_AUTH_DATABASE=admin
              - ME_CONFIG_MONGODB_AUTH_USERNAME=${MONGO_ROOT_USER}
              - ME_CONFIG_MONGODB_AUTH_PASSWORD=${MONGO_ROOT_PASSWORD}
              - ME_CONFIG_BASICAUTH_USERNAME=${MONGOEXPRESS_LOGIN}
              - ME_CONFIG_BASICAUTH_PASSWORD=${MONGOEXPRESS_PASSWORD}
          depends_on:
              - mongo
          ports:
            - "8080:8081"
  </code></pre>
  
  <p>and .env file:</p>
  
  <pre><code>MONGO_ROOT_USER=devroot
  MONGO_ROOT_PASSWORD=devroot
  MONGOEXPRESS_LOGIN=dev
  MONGOEXPRESS_PASSWORD=dev
  </code></pre>
  
  <p>After <code>docker-compose up</code> mongo-service is running, but mongo-express fails. I see error in logs:</p>
  
  <pre><code>mongo-express_1  | Welcome to mongo-express
  mongo-express_1  | ------------------------
  mongo-express_1  | Mongo Express server listening at http://0.0.0.0:8081
  mongo-express_1  | Server is open to allow connections from anyone (0.0.0.0)
  mongo-express_1  | Database connected
  mongo-express_1  | Connecting to admin...
  mongo-express_1  | TypeError: db is not a function
  mongo-express_1  |     at /node_modules/mongo-express/lib/db.js:114:53
  mongo-express_1  |     at Array.forEach (native) 
  </code></pre>
  
  <p>What I do wrong? Thanks for advance!</p>