version: '3.1'

services:
  mongo:
    image: mongo:5.0.16
    restart: always
    ports:
      - 27017:27017
    environment:
      MONGO_INITDB_ROOT_USERNAME: root
      MONGO_INITDB_ROOT_PASSWORD: example
      MONGO_INITDB_DATABASE: poolspopup
    volumes:
      - mongodb_data_container:/data/db
      - mongodb_data_container:/data/configdb
      - mongodb_data_container:/docker-entrypoint-initdb.d
      - ./mongo-entrypoint:/docker-entrypoint-initdb.d

volumes:
  mongodb_data_container:
