version: '3'
services:
  mongodb:
    image: 'mongo'
    container_name: 'mongo-container'
    environment:
     - MONGO_INITDB_DATABASE=mongodb
     - MONGO_INITDB_ROOT_USERNAME=mongorootuser
     - MONGO_INITDB_ROOT_PASSWORD=mongorootpw
    ports:
     - '27017-27019:27017-27019'
  mongo-express:
    image: mongo-express
    environment:
      - ME_CONFIG_MONGODB_SERVER=mongodb
      - ME_CONFIG_MONGODB_ADMINUSERNAME=mongorootuser
      - ME_CONFIG_MONGODB_ADMINPASSWORD=mongorootpw
    ports:
      - 8081:8081