version: '3.3'

services:
  mongodb:
    container_name: mongodb
    image: mongo
    restart: always
    ports:
      - 27017:27017
    environment:
      - MONGO_INITDB_ROOT_USERNAME=root
      - MONGO_INITDB_ROOT_PASSWORD=root
      - PUID=1000
      - PGID=1000
    volumes:
      - evolution_mongodb_data:/data/db
      - evolution_mongodb_configdb:/data/configdb
    expose:
      - 27017

  mongo-express:
    image: mongo-express
    environment:
      ME_CONFIG_BASICAUTH_USERNAME: root
      ME_CONFIG_BASICAUTH_PASSWORD: root
      ME_CONFIG_MONGODB_SERVER: mongodb
      ME_CONFIG_MONGODB_ADMINUSERNAME: root
      ME_CONFIG_MONGODB_ADMINPASSWORD: root
    ports:
      - 8081:8081
    links:
      - mongodb

volumes:
  evolution_mongodb_data:
  evolution_mongodb_configdb:


networks:
  evolution-net:
    name: evolution-net
    driver: bridge
