version: '3.8'

services:
  mongodb:
    image: mongo:latest
    container_name: personal_mongodb
    restart: unless-stopped
    environment:
      MONGO_INITDB_ROOT_USERNAME: admin
      MONGO_INITDB_ROOT_PASSWORD: bello98A.
      MONGO_INITDB_DATABASE: toxinfo
    ports:
      - "27017:27017"
    volumes:
      - mongodb_data:/data/db
      - mongodb_config:/data/configdb
    networks:
      - personal_network

volumes:
  mongodb_data:
    driver: local
  mongodb_config:
    driver: local

networks:
  personal_network:
    driver: bridge
