version: "3"
services:
  mongo:
    image: mongo:6.0.2
    ports:
      - 27017:27017
    restart: always
    volumes:
      - db-data:/data/db
    environment:
      MONGO_INITDB_ROOT_USERNAME: admin
      MONGO_INITDB_ROOT_PASSWORD: 4xx5uXqmdd06XCt8
  mongo-express:
    image: mongo-express
    restart: always
    ports:
      - 8081:8081
    environment:
      ME_CONFIG_MONGODB_ADMINUSERNAME: admin
      ME_CONFIG_MONGODB_ADMINPASSWORD: 4xx5uXqmdd06XCt8
      ME_CONFIG_MONGODB_URL: mongodb://admin:4xx5uXqmdd06XCt8@mongo:27017/

volumes:
  db-data: